Package com.terracottatech.store
Class AbstractRecord<K extends Comparable<K>>
- Type Parameters:
K- record key type.
- All Implemented Interfaces:
CellCollection,KeyedCellCollection<K>,Record<K>,Iterable<Cell<?>>,Collection<Cell<?>>
public abstract class AbstractRecord<K extends Comparable<K>>
extends AbstractCollection<Cell<?>>
implements Record<K>
A useful partial implementation of
Record.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.terracottatech.store.KeyedCellCollection
KeyedCellCollection.Detached<K extends Comparable<K>>, KeyedCellCollection.SubsetView<K extends Comparable<K>> -
Field Summary
Fields inherited from interface com.terracottatech.store.CellCollection
CELLS_FIELD_NAME, DEPRECATED_CELLS_FIELD_NAMEFields inherited from interface com.terracottatech.store.KeyedCellCollection
DEPRECATED_KEY_FIELD_NAME, KEY_FIELD_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends Cell<?>> c) voidclear()booleanIndicates whether this record is equal to another object.inthashCode()Returns a hash code value for this collection.booleanbooleanremoveAll(Collection<?> c) booleanbooleanretainAll(Collection<?> c) toString()Methods inherited from class java.util.AbstractCollection
contains, containsAll, isEmpty, iterator, size, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.terracottatech.store.CellCollection
cell, get, getMethods inherited from interface java.util.Collection
contains, containsAll, isEmpty, iterator, parallelStream, size, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface com.terracottatech.store.KeyedCellCollection
asStoreMap, getKey, subset, subsetMethods inherited from interface com.terracottatech.store.Record
getEqualsPredicate
-
Constructor Details
-
AbstractRecord
public AbstractRecord()
-
-
Method Details
-
toString
- Overrides:
toStringin classAbstractCollection<Cell<?>>
-
equals
Description copied from interface:RecordIndicates whether this record is equal to another object.A record is equal to:
- the ABA-safe same record from the same dataset
- a record from a different dataset with the same contents
- a keyed-cell collection that is not a record and has the same contents
- Specified by:
equalsin interfaceCollection<K extends Comparable<K>>- Specified by:
equalsin interfaceKeyedCellCollection<K extends Comparable<K>>- Specified by:
equalsin interfaceRecord<K extends Comparable<K>>- Overrides:
equalsin classObject- Parameters:
obj- object to be compared for equality with this record- Returns:
trueif the specified object is equal to this record- See Also:
-
hashCode
public int hashCode()Description copied from interface:KeyedCellCollectionReturns a hash code value for this collection.While conforming to the general contract established for
Object.hashCode, in concert with#equals, implementations forKeyedCellCollectionsubclasses will consider the value forgetKeyand the cells contained in this instance.- Specified by:
hashCodein interfaceCollection<K extends Comparable<K>>- Specified by:
hashCodein interfaceKeyedCellCollection<K extends Comparable<K>>- Overrides:
hashCodein classObject- Returns:
- a hash code for this instance.
- See Also:
-
add
- Specified by:
addin interfaceCollection<K extends Comparable<K>>- Overrides:
addin classAbstractCollection<Cell<?>>
-
remove
- Specified by:
removein interfaceCollection<K extends Comparable<K>>- Overrides:
removein classAbstractCollection<Cell<?>>
-
addAll
- Specified by:
addAllin interfaceCollection<K extends Comparable<K>>- Overrides:
addAllin classAbstractCollection<Cell<?>>
-
removeAll
- Specified by:
removeAllin interfaceCollection<K extends Comparable<K>>- Overrides:
removeAllin classAbstractCollection<Cell<?>>
-
retainAll
- Specified by:
retainAllin interfaceCollection<K extends Comparable<K>>- Overrides:
retainAllin classAbstractCollection<Cell<?>>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<K extends Comparable<K>>- Overrides:
clearin classAbstractCollection<Cell<?>>
-
removeIf
- Specified by:
removeIfin interfaceCollection<K extends Comparable<K>>
-