Package-level declarations

Schemas for most Kotlin data types.

Types

Link copied to clipboard

Abstract schema representing collections of type T with elements of type TChildren whose schema is of type TSchema.

Link copied to clipboard
abstract class AbstractSimpleSchema<T>(validations: Iterable<Validation<T>>) : Schema<T>

Abstract schema representing simple (non-parent) values of type T.

Link copied to clipboard
open class AnySchema<T>(validations: Iterable<Validation<T?>> = emptyList(), val initialValue: T? = null, val clone: CloneFunction<T>? = null) : AbstractSimpleSchema<T?>

"Catch-all" schema representing (possibly nullable) values of any given type.

Link copied to clipboard
open class BigDecimalSchema(validations: Iterable<Validation<BigDecimal>> = emptyList(), val initialValue: BigDecimal = zeroOfPreferredScale(validations)) : AbstractSimpleSchema<BigDecimal>

Schema representing numeric values of type BigDecimal.

Link copied to clipboard
open class BigIntegerSchema(validations: Iterable<Validation<BigInteger>> = emptyList(), val initialValue: BigInteger = BigInteger.ZERO) : AbstractSimpleSchema<BigInteger>

Schema representing numeric values of type BigInteger.

Link copied to clipboard
open class BooleanSchema(validations: Iterable<Validation<Boolean>> = emptyList(), val initialValue: Boolean = false) : AbstractSimpleSchema<Boolean>

Schema representing values of type Boolean.

Link copied to clipboard
open class ByteSchema(validations: Iterable<Validation<Byte>> = emptyList(), val initialValue: Byte = 0) : AbstractSimpleSchema<Byte>

Schema representing numeric values of type Byte.

Link copied to clipboard
open class CharSchema(validations: Iterable<Validation<Char>> = emptyList(), val initialValue: Char = 0.toChar()) : AbstractSimpleSchema<Char>

Schema representing values of type Char.

Link copied to clipboard
open class ClassSchema<T : Any> : ParentSchema<T>

Implementation of a schema representing values of a given class T with KClass. Use the ClassSchema.invoke function to create an instance of this class.

Link copied to clipboard

Builder of a class schema. Use the ClassSchema constructor function to build a class schema.

Link copied to clipboard
class ClassState(childrenSchemas: Map<String, Schema<*>>) : ParentState

Class responsible for holding the states of the children of a class.

Link copied to clipboard
typealias CloneFunction<T> = (value: T?) -> T?

Function responsible for creating a clone of a value of this schema.

Link copied to clipboard
interface ComputedSchema<T> : Schema<T>

A schema representing a computed value of type T: a form value that should equal the result of evaluating a given computation over other values of the form. A common example of a computed value would be a field whose value should equal the sum of other form values.

Link copied to clipboard
typealias ConstructorFunction<T> = (childValues: Map<String, Any?>, childProps: Map<String, KMutableProperty1<T, Any?>>) -> T

Function responsible for creating an instance of type T from two maps mapping children names to their values and properties.

Link copied to clipboard
open class DoubleSchema(validations: Iterable<Validation<Double>> = emptyList(), val initialValue: Double = 0.0) : AbstractSimpleSchema<Double>

Schema representing numeric values of type Double.

Link copied to clipboard

Implementation of a schema representing enum values of type T. Use the EnumSchema constructor function to create an instance of this class.

Link copied to clipboard
open class FileSchema(validations: Iterable<Validation<File>> = emptyList(), val initialValue: File = emptyPlaceholderFile()) : AbstractSimpleSchema<File>

Schema representing values of type File.

Link copied to clipboard
open class FloatSchema(validations: Iterable<Validation<Float>> = emptyList(), val initialValue: Float = 0.0f) : AbstractSimpleSchema<Float>

Schema representing numeric values of type Float.

Link copied to clipboard
open class InstantSchema(validations: Iterable<Validation<Instant>> = emptyList(), val initialValue: Instant = DEFAULT_INITIAL_VALUE) : AbstractSimpleSchema<Instant>

Schema representing values of type Instant.

Link copied to clipboard
open class IntSchema(validations: Iterable<Validation<Int>> = emptyList(), val initialValue: Int = 0) : AbstractSimpleSchema<Int>

Schema representing numeric values of type Int.

Link copied to clipboard
open class ListSchema<T, TSchema : Schema<T>>(elementsSchema: TSchema, validations: Iterable<Validation<List<T>>> = emptyList(), val initialValue: List<T> = emptyList()) : AbstractCollectionSchema<List<T>, T, TSchema>

Schema representing lists of values of type T with a schema of type TSchema.

Link copied to clipboard
class ListState(elementsSchema: Schema<*>) : CollectionState

Class responsible for holding the states of the children of a list.

Link copied to clipboard
open class LocalDateSchema(validations: Iterable<Validation<LocalDate>> = emptyList(), val initialValue: LocalDate = DEFAULT_INITIAL_VALUE) : AbstractSimpleSchema<LocalDate>

Schema representing values of type LocalDate defined by KotlinX DateTime.

Link copied to clipboard
open class LocalDateTimeSchema(validations: Iterable<Validation<LocalDateTime>> = emptyList(), val initialValue: LocalDateTime = DEFAULT_INITIAL_VALUE) : AbstractSimpleSchema<LocalDateTime>

Schema representing values of type LocalDateTime defined by KotlinX DateTime.

Link copied to clipboard
open class LongSchema(validations: Iterable<Validation<Long>> = emptyList(), val initialValue: Long = 0) : AbstractSimpleSchema<Long>

Schema representing numeric values of type Long.

Link copied to clipboard
interface NullableSchema<T> : Schema<T?>

Schema representing nullable values.

Link copied to clipboard
open class ShortSchema(validations: Iterable<Validation<Short>> = emptyList(), val initialValue: Short = 0) : AbstractSimpleSchema<Short>

Schema representing numeric values of type Short.

Link copied to clipboard
open class StringSchema(validations: Iterable<Validation<String>> = emptyList(), val initialValue: String = "") : AbstractSimpleSchema<String>

Schema representing values of type String.

Link copied to clipboard
open class TableSchema<T, TSchema : Schema<T>>(elementsSchema: TSchema, validations: Iterable<Validation<Table<T>>> = emptyList(), val initialValue: Table<T> = tableOf()) : AbstractCollectionSchema<Table<T>, T, TSchema>

Schema representing a table of values of type T with a schema of type TSchema.

Link copied to clipboard
class TableState(elementsSchema: Schema<*>) : CollectionState

Class responsible for holding the states of the children of a list.