final class RecordSchema extends AnyRef
RecordSchema represents the declaration of a heterogeneous Record type, with Fields that are determined at runtime. A Field declares the static type of its associated values, so although the record itself is dynamic, field access is type-safe.
Given a RecordSchema declaration schema
, any number of
Records of that schema can be obtained with
schema.newRecord
. The type that Scala assigns to this value is what Scala calls a
"path-dependent type," meaning that
schema1.Record
and schema2.Record
name distinct types. The same is true of fields:
schema1.Field[A]
and schema2.Field[A]
are distinct, and can only be used with the
corresponding Record.
- Alphabetic
- By Inheritance
- RecordSchema
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new RecordSchema()
Type Members
- sealed trait Field[A] extends AnyRef
Field is a handle used to access some corresponding value in a Record.
Field is a handle used to access some corresponding value in a Record. A field may also declare a default, which is computed for each record it is associated with, at most once per record instance.
- final class Record extends AnyRef
Record is an instance of a RecordSchema declaration.
Record is an instance of a RecordSchema declaration. Records are mutable; the
update
method assigns or reassigns a value to a given field. If the user requires that a field's assigned value is never reassigned later, the user canlock
that field.
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newField[A](defaultSupplier: => A): Field[A]
Creates a new Field with the given
defaultSupplier
, to be used only with Records from this schema. - def newField[A](): Field[A]
Creates a new Field with no default value, to be used only with Records from this schema.
- def newRecord(): Record
Creates a new Record from this Schema.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()