K
- the key type for the recordpublic interface Record<K extends java.lang.Comparable<K>> extends CellCollection
Cell
s associated with a key. The set of cells
forming a record are unique in name. Records are immutable and are the
largest atomically modifiable data structure within a dataset. Naturally
records should therefore correspond to the natural aggregate or atomic data
unit within an application.
The iteration order over Cell
s in a Record
is undefined.
Modifier and Type | Method and Description |
---|---|
static <K extends java.lang.Comparable<K>> |
emptyRecord(K key)
Returns an empty record instance for the given key.
|
boolean |
equals(java.lang.Object other)
Indicates whether some object is equal to this
Record . |
default BuildablePredicate<? super Record<K>> |
getEqualsPredicate()
Returns a predicate that tests if another
Record instance is the same as this one. |
K |
getKey()
Returns the key for this record.
|
int |
hashCode()
Returns a hash code value for this record.
|
static <K extends java.lang.Comparable<K>> |
keyFunction()
Returns a function that, given a record, gives the key.
|
get, get
K getKey()
boolean equals(java.lang.Object other)
Record
.
While conforming to the general contract established for
Object.equals
, implementations for
Record
subclasses will consider the value for getKey
and the cells contained in this record instance.
equals
in interface java.util.Collection<Cell<?>>
equals
in class java.lang.Object
other
- the reference object against which this
is compared.true
if this Record
is the same as other
or for which the key and contained cells are equal;
false
otherwise.hashCode()
int hashCode()
While conforming to the general contract established for
Object.hashCode
, in concert with #equals
,
implementations for Record
subclasses will consider the value for
getKey
and the cells contained in this record instance.
hashCode
in interface java.util.Collection<Cell<?>>
hashCode
in class java.lang.Object
equals(Object)
default BuildablePredicate<? super Record<K>> getEqualsPredicate()
Record
instance is the same as this one.Record
instance is the same as this one.static <K extends java.lang.Comparable<K>> BuildableComparableFunction<Record<K>,K> keyFunction()
K
- the key type for the recordstatic <K extends java.lang.Comparable<K>> Record<K> emptyRecord(K key)
K
- key typekey
- record key