public static class KeyCollectionImpl.BuilderImpl<E>
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
KeyCollectionImpl.BuilderImpl.KeyMapBuilder<E,K> |
| Constructor and Description |
|---|
BuilderImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected KeyCollectionImpl.BuilderImpl<E> |
withAfterDeleteTrigger(java.util.function.Consumer<E> trigger)
Specify delete trigger.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withAfterInsertTrigger(java.util.function.Consumer<E> trigger)
Specify insert trigger.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withBeforeDeleteTrigger(java.util.function.Consumer<E> trigger)
Specify delete trigger.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withBeforeInsertTrigger(java.util.function.Consumer<E> trigger)
Specify insert trigger.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withCapacity(int capacity)
Specify initial capacity.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withConstraint(java.util.function.Predicate<E> constraint)
Specify element constraint.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withContent(java.util.Collection<? extends E> elements)
Specify elements added to the collection upon creation.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withContent(E... elements)
Specify elements added to the collection upon creation.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withElemCount(boolean count)
Specifies that the collection only counts the number of occurrences
of equal elements, but does not store the elements themselves.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withElemDuplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withElemDuplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withElemNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withElemSet()
Add element map (with ident mapper).
|
protected KeyCollectionImpl.BuilderImpl<E> |
withElemSort(boolean sort)
Specify that the element set should be sorted using the natural comparator.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withElemSort(java.util.Comparator<? super E> comparator)
Set comparator to use for sorting the element set.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withElemSort(java.util.Comparator<? super E> comparator,
boolean sortNullsFirst)
Set comparator to use for sorting the element set.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKey1Duplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKey1Duplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKey1Null(boolean allowNull)
Specify whether null elements are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKey1Sort(boolean sort)
Set comparator to use for sorting the key map.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKey2Duplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKey2Duplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKey2Null(boolean allowNull)
Specify whether null elements are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKey2Sort(boolean sort)
Set comparator to use for sorting the key map.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withKeyDuplicates(int keyIndex,
boolean allowDuplicates,
boolean allowDuplicatesNull) |
protected KeyCollectionImpl.BuilderImpl<E> |
withKeyMap(int keyIndex,
java.util.function.Function mapper) |
protected KeyCollectionImpl.BuilderImpl<E> |
withKeyNull(int keyIndex,
boolean allowNull) |
protected KeyCollectionImpl.BuilderImpl<E> |
withKeySort(int keyIndex,
boolean sort) |
protected KeyCollectionImpl.BuilderImpl<E> |
withKeySort(int keyIndex,
java.util.Comparator<?> comparator) |
protected KeyCollectionImpl.BuilderImpl<E> |
withKeySort(int keyIndex,
java.util.Comparator<?> comparator,
boolean sortNullsFirst) |
protected KeyCollectionImpl.BuilderImpl<E> |
withListBig(boolean big)
Specify whether list should be stored in an instance of BigList or GapList.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withListType(java.lang.Class<?> type)
Specifies that the list will store its elements as primitive type.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withMaxSize(int maxSize)
Specify maximum size of collection.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withOrderByElem(boolean orderBy)
Specifies that the collection will have the order of the element set.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withOrderByElem(java.lang.Class<?> type)
Specifies that the list will have the order of the element set.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withOrderByKey(int keyIndex,
boolean orderBy) |
protected KeyCollectionImpl.BuilderImpl<E> |
withOrderByKey(int keyIndex,
java.lang.Class<?> type) |
protected KeyCollectionImpl.BuilderImpl<E> |
withOrderByKey1(boolean orderBy)
Specifies that the collection will have the order of the key map.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withOrderByKey1(java.lang.Class<?> type)
Specifies that the list will have the order of the key map.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withOrderByKey2(boolean orderBy)
Specifies that the collection will have the order of the key map.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withOrderByKey2(java.lang.Class<?> type)
Specifies that the list will have the order of the key map.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withPrimaryElem()
Specify the element to be a primary key.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withPrimaryKeyMap(int keyIndex,
java.util.function.Function mapper) |
protected KeyCollectionImpl.BuilderImpl<E> |
withSetBehavior(boolean setBehavior)
Specifies that the collection behaves like a
Set on adding elements, i.e. |
protected KeyCollectionImpl.BuilderImpl<E> |
withUniqueElem()
Specify the element to be a unique key.
|
protected KeyCollectionImpl.BuilderImpl<E> |
withUniqueKeyMap(int keyIndex,
java.util.function.Function mapper) |
protected KeyCollectionImpl.BuilderImpl<E> |
withWindowSize(int maxSize)
Specify maximum window size of collection.
|
protected KeyCollectionImpl.BuilderImpl<E> withNull(boolean allowNull)
withElemNull(boolean) does.allowNull - true to allow null elements (default), false to disallowprotected KeyCollectionImpl.BuilderImpl<E> withConstraint(java.util.function.Predicate<E> constraint)
constraint - constraint element must satisfy, null for none (default)protected KeyCollectionImpl.BuilderImpl<E> withBeforeInsertTrigger(java.util.function.Consumer<E> trigger)
trigger - insert trigger method, null for none (default)protected KeyCollectionImpl.BuilderImpl<E> withAfterInsertTrigger(java.util.function.Consumer<E> trigger)
trigger - insert trigger method, null for none (default)protected KeyCollectionImpl.BuilderImpl<E> withBeforeDeleteTrigger(java.util.function.Consumer<E> trigger)
trigger - delete trigger method, null for none (default)protected KeyCollectionImpl.BuilderImpl<E> withAfterDeleteTrigger(java.util.function.Consumer<E> trigger)
trigger - delete trigger method, null for none (default)protected KeyCollectionImpl.BuilderImpl<E> withCapacity(int capacity)
capacity - initial capacityprotected KeyCollectionImpl.BuilderImpl<E> withContent(java.util.Collection<? extends E> elements)
elements - initial elementsprotected KeyCollectionImpl.BuilderImpl<E> withContent(E... elements)
elements - initial elementsprotected KeyCollectionImpl.BuilderImpl<E> withMaxSize(int maxSize)
maxSize - maximum sizeprotected KeyCollectionImpl.BuilderImpl<E> withWindowSize(int maxSize)
maxSize - maximum window sizeprotected KeyCollectionImpl.BuilderImpl<E> withSetBehavior(boolean setBehavior)
Set on adding elements, i.e.
if an element cannot be added due to duplicate or other constraints, no exception is thrown.setBehavior - true to define set behavior (default is false)protected KeyCollectionImpl.BuilderImpl<E> withElemCount(boolean count)
count - true to count only number of occurrences (default is false)protected KeyCollectionImpl.BuilderImpl<E> withElemSet()
protected KeyCollectionImpl.BuilderImpl<E> withOrderByElem(boolean orderBy)
orderBy - if true the collection will have the order of the element set
(default is false, only one key map or the element set can have the order by option set)protected KeyCollectionImpl.BuilderImpl<E> withOrderByElem(java.lang.Class<?> type)
int.
The set will be sorted using the natural comparator and no null values are allowed.type - primitive type to use for key map
(only one key map or the element set can have the order by option set)protected KeyCollectionImpl.BuilderImpl<E> withElemNull(boolean allowNull)
withNull(boolean) does not.allowNull - true to allow null elements, false to disallow (default is true)protected KeyCollectionImpl.BuilderImpl<E> withElemDuplicates(boolean allowDuplicates)
allowDuplicates - true to allow duplicates (default is true)protected KeyCollectionImpl.BuilderImpl<E> withElemDuplicates(boolean allowDuplicates, boolean allowDuplicatesNull)
allowDuplicates - true to allow duplicates (default is true)allowDuplicatesNull - true to allow duplicate null values (default is true)protected KeyCollectionImpl.BuilderImpl<E> withElemSort(boolean sort)
sort - true to sorted, false for unsorted (default is false)protected KeyCollectionImpl.BuilderImpl<E> withElemSort(java.util.Comparator<? super E> comparator)
comparator - comparator to use for sorting (null for natural comparator)protected KeyCollectionImpl.BuilderImpl<E> withElemSort(java.util.Comparator<? super E> comparator, boolean sortNullsFirst)
comparator - comparator to use for sortingsortNullsFirst - true to sort null values first, false for lastprotected KeyCollectionImpl.BuilderImpl<E> withPrimaryElem()
protected KeyCollectionImpl.BuilderImpl<E> withUniqueElem()
protected KeyCollectionImpl.BuilderImpl<E> withKeyMap(int keyIndex, java.util.function.Function mapper)
protected KeyCollectionImpl.BuilderImpl<E> withOrderByKey(int keyIndex, boolean orderBy)
protected KeyCollectionImpl.BuilderImpl<E> withOrderByKey(int keyIndex, java.lang.Class<?> type)
protected KeyCollectionImpl.BuilderImpl<E> withListType(java.lang.Class<?> type)
type - primitive type to use for listprotected KeyCollectionImpl.BuilderImpl<E> withListBig(boolean big)
big - true to store list content in an instance of BigList, false for GapListprotected KeyCollectionImpl.BuilderImpl<E> withKeyNull(int keyIndex, boolean allowNull)
protected KeyCollectionImpl.BuilderImpl<E> withKeyDuplicates(int keyIndex, boolean allowDuplicates, boolean allowDuplicatesNull)
protected KeyCollectionImpl.BuilderImpl<E> withKeySort(int keyIndex, boolean sort)
protected KeyCollectionImpl.BuilderImpl<E> withKeySort(int keyIndex, java.util.Comparator<?> comparator)
protected KeyCollectionImpl.BuilderImpl<E> withKeySort(int keyIndex, java.util.Comparator<?> comparator, boolean sortNullsFirst)
protected KeyCollectionImpl.BuilderImpl<E> withPrimaryKeyMap(int keyIndex, java.util.function.Function mapper)
protected KeyCollectionImpl.BuilderImpl<E> withUniqueKeyMap(int keyIndex, java.util.function.Function mapper)
protected KeyCollectionImpl.BuilderImpl<E> withOrderByKey1(boolean orderBy)
orderBy - if true the collection will have the order of the key map
(default is false, only one key map or the element set can have the order by option set)protected KeyCollectionImpl.BuilderImpl<E> withOrderByKey1(java.lang.Class<?> type)
int.
The key map will be sorted using the natural comparator and no null values are allowed.type - primitive type to use for key map
(only one key map or the element set can have the order by option set)protected KeyCollectionImpl.BuilderImpl<E> withKey1Null(boolean allowNull)
allowNull - true to allow null elements, false to disallowprotected KeyCollectionImpl.BuilderImpl<E> withKey1Duplicates(boolean allowDuplicates)
allowDuplicates - true to allow duplicatesprotected KeyCollectionImpl.BuilderImpl<E> withKey1Duplicates(boolean allowDuplicates, boolean allowDuplicatesNull)
allowDuplicates - true to allow duplicatesallowDuplicatesNull - true to allow duplicate null valuesprotected KeyCollectionImpl.BuilderImpl<E> withKey1Sort(boolean sort)
sort - true to sort key mapprotected KeyCollectionImpl.BuilderImpl<E> withOrderByKey2(boolean orderBy)
orderBy - if true the collection will have the order of the key map
(default is false, only one key map or the element set can have the order by option set)protected KeyCollectionImpl.BuilderImpl<E> withOrderByKey2(java.lang.Class<?> type)
int.
The key map will be sorted using the natural comparator and no null values are allowed.type - primitive type to use for key map
(only one key map or the element set can have the order by option set)protected KeyCollectionImpl.BuilderImpl<E> withKey2Null(boolean allowNull)
allowNull - true to allow null elements, false to disallowprotected KeyCollectionImpl.BuilderImpl<E> withKey2Duplicates(boolean allowDuplicates)
allowDuplicates - true to allow duplicatesprotected KeyCollectionImpl.BuilderImpl<E> withKey2Duplicates(boolean allowDuplicates, boolean allowDuplicatesNull)
allowDuplicates - true to allow duplicatesallowDuplicatesNull - true to allow duplicate null valuesprotected KeyCollectionImpl.BuilderImpl<E> withKey2Sort(boolean sort)
sort - true to sort key map