E - type of elements stored in the listK - type of keypublic class Key1Collection<E,K> extends KeyCollectionImpl<E>
Key1List,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
Key1Collection.Builder<E,K>
Builder to construct Key1Collection instances.
|
KeyCollectionImpl.BuilderImpl<E>| Modifier and Type | Method and Description |
|---|---|
java.util.Map<K,E> |
asMap1()
Returns a map view to the key map.
|
boolean |
containsKey1(K key)
Checks whether an element with specified key exists.
|
Key1Collection<E,K> |
copy()
Returns a copy of this collection with all its elements.
|
Key1Collection<E,K> |
crop()
Returns a copy of this collection but without elements.
|
GapList<E> |
getAll(E elem)
Returns all equal elements.
|
GapList<E> |
getAllByKey1(K key)
Returns all elements with specified key.
|
E |
getByKey1(K key)
Returns element with specified key.
|
int |
getCount(E elem)
Returns the number of equal elements.
|
int |
getCountByKey1(K key)
Returns the number of elements with specified key.
|
java.util.Set<E> |
getDistinct()
Returns all distinct elements in the same order as in the collection.
|
java.util.Set<K> |
getDistinctKeys1()
Returns all distinct keys in the same order as in the key map.
|
Mapper<E,K> |
getKey1Mapper()
Returns mapper for key map.
|
void |
invalidate(E elem)
Invalidate element, i.e. all keys of the element are extracted
again and stored in the key maps.
|
void |
invalidateKey1(K oldKey,
K newKey,
E elem)
Invalidate key value of element.
|
E |
puByKey1(E elem)
Adds or replaces element with specified key.
|
E |
put(E elem)
Adds or replaces element.
|
GapList<E> |
removeAll(E elem)
Removes all equal elements.
|
GapList<E> |
removeAllByKey1(K key)
Removes all elements with specified key.
|
E |
removeByKey1(K key)
Removes element with specified key.
|
public Key1Collection<E,K> copy()
KeyCollectionImplcopy in class KeyCollectionImpl<E>public Key1Collection<E,K> crop()
KeyCollectionImplcrop in class KeyCollectionImpl<E>public GapList<E> getAll(E elem)
KeyCollectionImplelem - elementpublic int getCount(E elem)
KeyCollectionImplelem - elementpublic GapList<E> removeAll(E elem)
KeyCollectionImplelem - elementpublic java.util.Set<E> getDistinct()
KeyCollectionImplpublic E put(E elem)
KeyCollectionImplelem - elementpublic void invalidate(E elem)
KeyCollectionImplelem - element to invalidatepublic Mapper<E,K> getKey1Mapper()
public java.util.Map<K,E> asMap1()
public boolean containsKey1(K key)
key - keypublic E getByKey1(K key)
key - keypublic GapList<E> getAllByKey1(K key)
key - keypublic int getCountByKey1(K key)
key - keypublic E removeByKey1(K key)
key - keypublic GapList<E> removeAllByKey1(K key)
key - keypublic java.util.Set<K> getDistinctKeys1()
public E puByKey1(E elem)
elem - elementpublic void invalidateKey1(K oldKey, K newKey, E elem)
oldKey - old key valuenewKey - new key valueelem - element to invalidate (can be null if there are no duplicates with this key)