Interface XPuttingCollection<E>
- Type Parameters:
E- type of contained elements
- All Superinterfaces:
CapacityCarrying,CapacityExtendable,Consumer<E>,ExtendedCollection<E>,OptimizableCollection,Sized,XAddingCollection<E>
- All Known Subinterfaces:
XBag<E>,XBasicEnum<E>,XBasicList<E>,XBasicSequence<E>,XBasicTable<K,V>,XBasicTable.Keys<K,V>,XChart<K,V>,XChart.Keys<K,V>,XCollection<E>,XEnum<E>,XExpandingEnum<E>,XExpandingList<E>,XExpandingSequence<E>,XIncreasingEnum<E>,XIncreasingList<E>,XIncreasingSequence<E>,XInputtingEnum<E>,XInputtingList<E>,XInputtingSequence<E>,XLadder<E>,XList<E>,XMap<K,V>,XMap.Keys<K,V>,XPutGetBag<E>,XPutGetCollection<E>,XPutGetEnum<E>,XPutGetList<E>,XPutGetSequence<E>,XPutGetSet<E>,XPutGetSortation<E>,XPuttingBag<E>,XPuttingEnum<E>,XPuttingList<E>,XPuttingSequence<E>,XPuttingSet<E>,XPuttingSortation<E>,XRank<E>,XSequence<E>,XSet<E>,XSortation<E>,XTable<K,V>,XTable.Keys<K,V>
- All Known Implementing Classes:
ArrayCollector,BulkList,Collector,EqBulkList,EqHashEnum,EqHashTable,EqHashTable.Keys,HashEnum,HashTable,HashTable.Keys,LimitList,LockedCollection,LockedList,LockedMap,MutexSet,OpenAdressingMiniSet,Single,SubCollector,SubList,SynchCollection,SynchList,SynchSet
public interface XPuttingCollection<E> extends XAddingCollection<E>
Putting aspect:
Ensure that all putted elements are contained in the collection
Ensure that all putted elements are contained in the collection
Examples: Set: Add all elements, overwriting equal already contained elements. Bag: Always add all elements (identical to add)
Note: Corresponds to the Java collections add() for single dimensional collections and put() for Map.
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceXPuttingCollection.Creator<E> -
Method Summary
Modifier and Type Method Description booleannullPut()booleanput(E element)Adds the specified element to this collection if it is not already present (optional operation).XPuttingCollection<E>putAll(E... elements)Adds the specified elements to this collection if it is not already present (optional operation).XPuttingCollection<E>putAll(E[] elements, int srcStartIndex, int srcLength)Adds the specified elements to this collection if it is not already present (optional operation).
Only the elements with indizes from the srcStartIndex to the srcStartIndex+srcLength are put in the collection.XPuttingCollection<E>putAll(XGettingCollection<? extends E> elements)Adds the specified elements to this collection if it is not already present (optional operation).Methods inherited from interface one.microstream.collections.interfaces.CapacityCarrying
isFull, maximumCapacity, remainingCapacityMethods inherited from interface one.microstream.collections.interfaces.CapacityExtendable
currentCapacity, currentFreeCapacity, ensureCapacity, ensureFreeCapacityMethods inherited from interface one.microstream.collections.interfaces.ExtendedCollection
hasVolatileElements, nullAllowedMethods inherited from interface one.microstream.collections.interfaces.OptimizableCollection
optimize
-
Method Details
-
put
Adds the specified element to this collection if it is not already present (optional operation).- Parameters:
element- to add- Returns:
- true if this collection did not already contain the specified element
-
nullPut
boolean nullPut() -
putAll
Adds the specified elements to this collection if it is not already present (optional operation).- Parameters:
elements- to add- Returns:
- this
-
putAll
Adds the specified elements to this collection if it is not already present (optional operation).
Only the elements with indizes from the srcStartIndex to the srcStartIndex+srcLength are put in the collection.- Parameters:
elements- to addsrcStartIndex- start index of elements-array to add to collectionsrcLength- length of elements-array to add to collection- Returns:
- this
-
putAll
Adds the specified elements to this collection if it is not already present (optional operation).- Parameters:
elements- to add- Returns:
- this
-