Package com.terracottatech.store
Class KeyedCellCollection.SubsetView<K extends Comparable<K>>
java.lang.Object
java.util.AbstractCollection<Cell<?>>
com.terracottatech.store.CellCollection.SubsetView
com.terracottatech.store.KeyedCellCollection.SubsetView<K>
- Type Parameters:
K- the key type
- All Implemented Interfaces:
CellCollection,KeyedCellCollection<K>,Iterable<Cell<?>>,Collection<Cell<?>>
- Enclosing interface:
- KeyedCellCollection<K extends Comparable<K>>
public static class KeyedCellCollection.SubsetView<K extends Comparable<K>>
extends CellCollection.SubsetView
implements KeyedCellCollection<K>
A subset view of a keyed cell collection.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.terracottatech.store.CellCollection
CellCollection.SubsetViewNested 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
ConstructorsModifierConstructorDescriptionprotectedSubsetView(KeyedCellCollection<K> of, Set<CellDefinition<?>> definitions) Creates a subset view of the given collection showing only the given cells -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some object is equal to thisKeyedCellCollection.getKey()Returns the key for this collection.inthashCode()Returns a hash code value for this collection.subset(Set<CellDefinition<?>> definitions) Retrieve a subset of cells by their definitions.Methods inherited from class com.terracottatech.store.CellCollection.SubsetView
cell, definitions, get, get, iterator, size, spliterator, streamMethods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods 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
add, addAll, clear, contains, containsAll, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArrayMethods inherited from interface com.terracottatech.store.KeyedCellCollection
asStoreMap, subset
-
Constructor Details
-
SubsetView
Creates a subset view of the given collection showing only the given cells- Parameters:
of- the collection to viewdefinitions- the cell definitions to select
-
-
Method Details
-
getKey
Description copied from interface:KeyedCellCollectionReturns the key for this collection.- Specified by:
getKeyin interfaceKeyedCellCollection<K extends Comparable<K>>- Returns:
- the collection key
-
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 classCellCollection.SubsetView- Returns:
- a hash code for this instance.
- See Also:
-
equals
Description copied from interface:KeyedCellCollectionIndicates whether some object is equal to thisKeyedCellCollection.While conforming to the general contract established for
Object.equals, implementations forKeyedCellCollectionsubclasses will consider the value forgetKeyand the cells contained in this instance.- Specified by:
equalsin interfaceCollection<K extends Comparable<K>>- Specified by:
equalsin interfaceKeyedCellCollection<K extends Comparable<K>>- Overrides:
equalsin classCellCollection.SubsetView- See Also:
-
subset
Description copied from interface:CellCollectionRetrieve a subset of cells by their definitions.The returned collection is a view. If this collection is mutable any mutations performed on this collection will be visible via the returned view.
- Specified by:
subsetin interfaceCellCollection- Specified by:
subsetin interfaceKeyedCellCollection<K extends Comparable<K>>- Overrides:
subsetin classCellCollection.SubsetView- Parameters:
definitions- cells to retrieve- Returns:
- a view of a subset of this collection
-