final class Record extends AnyRef
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 can lock
that field.
- Alphabetic
- By Inheritance
- Record
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- def apply[A](field: Field[A]): A
Returns the current value assigned to
fieldin this record.Returns the current value assigned to
fieldin this record. If there is no value currently assigned (either explicitly by a previousupdate, or by the field's declared default), this will throw anIllegalStateException, indicating the field was never initialized.Note that Scala provides two syntactic equivalents for invoking this method:
record.apply(field) record(field)
- field
the field to access in this record
- returns
the value associated with
field.
- Annotations
- @throws(classOf[IllegalStateException])
- Exceptions thrown
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def copy[A](field: Field[A], value: A): Record
Create a copy of this record with
valueassigned tofield.Create a copy of this record with
valueassigned tofield.fieldwill be locked in the copy if and only if it was present and locked in the original record. Iffieldwas not present in the original then the following are equivalent:record.copy(field, value) record.copy().update(field, value)
- field
the field to assign in the copy
- value
the value to assign to
fieldin the copy- returns
a copy of this record
- def copy(): Record
Create a copy of this record.
Create a copy of this record. Fields are locked in the copy if and only if they were locked in the original record.
- returns
a copy of this record
- 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
- def lock(field: Field[_]): Record
Locks the current value for a given
fieldin this record, preventing furtherupdates.Locks the current value for a given
fieldin this record, preventing furtherupdates. If there is no value currently assigned (either explicitly by a previousupdate, or by the field's declared default), this will throw anIllegalStateException, indicating the field was never initialized.- field
the field to lock in this record
- returns
this record
- Annotations
- @throws(classOf[IllegalStateException])
- Exceptions thrown
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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
- def update[A](field: Field[A], value: A): Record
Assigns (or reassigns) a
valueto afieldin this record.Assigns (or reassigns) a
valueto afieldin this record. If this field was previouslylocked, this will throw anIllegalStateExceptionto indicate failure.Note that Scala provides two syntactic equivalents for invoking this method:
record.update(field, value) record(field) = value
- field
the field to assign in this record
- value
the value to assign to
fieldin this record- returns
this record
- Annotations
- @throws(classOf[IllegalStateException])
- Exceptions thrown
- def updateAndLock[A](field: Field[A], value: A): Record
Assigns (or reassigns) a
valueto afieldin this record, and locks it to prevent furtherupdates.Assigns (or reassigns) a
valueto afieldin this record, and locks it to prevent furtherupdates. This method is provided for convenience only; the following are equivalent:record.updateAndLock(field, value) record.update(field, value).lock(field)
- field
the field to assign and lock in this record
- value
the value to assign to
fieldin this record- returns
this record
- Annotations
- @throws(classOf[IllegalStateException])
- Exceptions thrown
- 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()