public static class KeyList.Builder<E> extends KeyCollectionImpl.BuilderImpl<E>
KeyCollectionImpl.BuilderImpl.KeyMapBuilder<E,K>| Constructor and Description |
|---|
Builder()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
KeyList<E> |
build()
Create collection with specified options.
|
KeyList.Builder<E> |
withAfterDeleteTrigger(java.util.function.Consumer<E> trigger)
Specify delete trigger.
|
KeyList.Builder<E> |
withAfterInsertTrigger(java.util.function.Consumer<E> trigger)
Specify insert trigger.
|
KeyList.Builder<E> |
withBeforeDeleteTrigger(java.util.function.Consumer<E> trigger)
Specify delete trigger.
|
KeyList.Builder<E> |
withBeforeInsertTrigger(java.util.function.Consumer<E> trigger)
Specify insert trigger.
|
KeyList.Builder<E> |
withCapacity(int capacity)
Specify initial capacity.
|
KeyList.Builder<E> |
withConstraint(java.util.function.Predicate<E> constraint)
Specify element constraint.
|
KeyList.Builder<E> |
withContent(java.util.Collection<? extends E> elements)
Specify elements added to the collection upon creation.
|
KeyList.Builder<E> |
withContent(E... elements)
Specify elements added to the collection upon creation.
|
KeyList.Builder<E> |
withElemDuplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
KeyList.Builder<E> |
withElemDuplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
KeyList.Builder<E> |
withElemNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
KeyList.Builder<E> |
withElemSet()
Add element map (with ident mapper).
|
KeyList.Builder<E> |
withElemSort(boolean sort)
Specify that the element set should be sorted using the natural comparator.
|
KeyList.Builder<E> |
withElemSort(java.util.Comparator<? super E> comparator)
Set comparator to use for sorting the element set.
|
KeyList.Builder<E> |
withElemSort(java.util.Comparator<? super E> comparator,
boolean sortNullsFirst)
Set comparator to use for sorting the element set.
|
KeyList.Builder<E> |
withListBig(boolean bigList)
Specify whether list should be stored in an instance of BigList or GapList.
|
KeyList.Builder<E> |
withListType(java.lang.Class<?> type)
Specifies that the list will store its elements as primitive type.
|
KeyList.Builder<E> |
withMaxSize(int maxSize)
Specify maximum size of collection.
|
KeyList.Builder<E> |
withNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
KeyList.Builder<E> |
withOrderByElem(boolean orderBy)
Specifies that the collection will have the order of the element set.
|
KeyList.Builder<E> |
withOrderByElem(java.lang.Class<?> type)
Specifies that the list will have the order of the element set.
|
KeyList.Builder<E> |
withPrimaryElem()
Specify the element to be a primary key.
|
KeyList.Builder<E> |
withUniqueElem()
Specify the element to be a unique key.
|
KeyList.Builder<E> |
withWindowSize(int maxSize)
Specify maximum window size of collection.
|
withElemCount, withKey1Duplicates, withKey1Duplicates, withKey1Null, withKey1Sort, withKey2Duplicates, withKey2Duplicates, withKey2Null, withKey2Sort, withKeyDuplicates, withKeyMap, withKeyNull, withKeySort, withKeySort, withKeySort, withOrderByKey, withOrderByKey, withOrderByKey1, withOrderByKey1, withOrderByKey2, withOrderByKey2, withPrimaryKeyMap, withSetBehavior, withUniqueKeyMappublic KeyList.Builder<E> withNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withElemNull(boolean) does.withNull in class KeyCollectionImpl.BuilderImpl<E>allowNull - true to allow null elements (default), false to disallowpublic KeyList.Builder<E> withConstraint(java.util.function.Predicate<E> constraint)
KeyCollectionImpl.BuilderImplwithConstraint in class KeyCollectionImpl.BuilderImpl<E>constraint - constraint element must satisfy, null for none (default)public KeyList.Builder<E> withBeforeInsertTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithBeforeInsertTrigger in class KeyCollectionImpl.BuilderImpl<E>trigger - insert trigger method, null for none (default)public KeyList.Builder<E> withAfterInsertTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithAfterInsertTrigger in class KeyCollectionImpl.BuilderImpl<E>trigger - insert trigger method, null for none (default)public KeyList.Builder<E> withBeforeDeleteTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithBeforeDeleteTrigger in class KeyCollectionImpl.BuilderImpl<E>trigger - delete trigger method, null for none (default)public KeyList.Builder<E> withAfterDeleteTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithAfterDeleteTrigger in class KeyCollectionImpl.BuilderImpl<E>trigger - delete trigger method, null for none (default)public KeyList.Builder<E> withCapacity(int capacity)
KeyCollectionImpl.BuilderImplwithCapacity in class KeyCollectionImpl.BuilderImpl<E>capacity - initial capacitypublic KeyList.Builder<E> withContent(java.util.Collection<? extends E> elements)
KeyCollectionImpl.BuilderImplwithContent in class KeyCollectionImpl.BuilderImpl<E>elements - initial elementspublic KeyList.Builder<E> withContent(E... elements)
KeyCollectionImpl.BuilderImplwithContent in class KeyCollectionImpl.BuilderImpl<E>elements - initial elementspublic KeyList.Builder<E> withMaxSize(int maxSize)
KeyCollectionImpl.BuilderImplwithMaxSize in class KeyCollectionImpl.BuilderImpl<E>maxSize - maximum sizepublic KeyList.Builder<E> withWindowSize(int maxSize)
KeyCollectionImpl.BuilderImplwithWindowSize in class KeyCollectionImpl.BuilderImpl<E>maxSize - maximum window sizepublic KeyList.Builder<E> withListBig(boolean bigList)
KeyCollectionImpl.BuilderImplwithListBig in class KeyCollectionImpl.BuilderImpl<E>bigList - true to store list content in an instance of BigList, false for GapListpublic KeyList.Builder<E> withListType(java.lang.Class<?> type)
KeyCollectionImpl.BuilderImplwithListType in class KeyCollectionImpl.BuilderImpl<E>type - primitive type to use for listpublic KeyList.Builder<E> withElemSet()
KeyCollectionImpl.BuilderImplwithElemSet in class KeyCollectionImpl.BuilderImpl<E>public KeyList.Builder<E> withOrderByElem(boolean orderBy)
KeyCollectionImpl.BuilderImplwithOrderByElem in class KeyCollectionImpl.BuilderImpl<E>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)public KeyList.Builder<E> withOrderByElem(java.lang.Class<?> type)
KeyCollectionImpl.BuilderImplint.
The set will be sorted using the natural comparator and no null values are allowed.withOrderByElem in class KeyCollectionImpl.BuilderImpl<E>type - primitive type to use for key map
(only one key map or the element set can have the order by option set)public KeyList.Builder<E> withElemNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withNull(boolean) does not.withElemNull in class KeyCollectionImpl.BuilderImpl<E>allowNull - true to allow null elements, false to disallow (default is true)public KeyList.Builder<E> withElemDuplicates(boolean allowDuplicates)
KeyCollectionImpl.BuilderImplwithElemDuplicates in class KeyCollectionImpl.BuilderImpl<E>allowDuplicates - true to allow duplicates (default is true)public KeyList.Builder<E> withElemDuplicates(boolean allowDuplicates, boolean allowDuplicatesNull)
KeyCollectionImpl.BuilderImplwithElemDuplicates in class KeyCollectionImpl.BuilderImpl<E>allowDuplicates - true to allow duplicates (default is true)allowDuplicatesNull - true to allow duplicate null values (default is true)public KeyList.Builder<E> withElemSort(boolean sort)
KeyCollectionImpl.BuilderImplwithElemSort in class KeyCollectionImpl.BuilderImpl<E>sort - true to sorted, false for unsorted (default is false)public KeyList.Builder<E> withElemSort(java.util.Comparator<? super E> comparator)
KeyCollectionImpl.BuilderImplwithElemSort in class KeyCollectionImpl.BuilderImpl<E>comparator - comparator to use for sorting (null for natural comparator)public KeyList.Builder<E> withElemSort(java.util.Comparator<? super E> comparator, boolean sortNullsFirst)
KeyCollectionImpl.BuilderImplwithElemSort in class KeyCollectionImpl.BuilderImpl<E>comparator - comparator to use for sortingsortNullsFirst - true to sort null values first, false for lastpublic KeyList.Builder<E> withPrimaryElem()
KeyCollectionImpl.BuilderImplwithPrimaryElem in class KeyCollectionImpl.BuilderImpl<E>public KeyList.Builder<E> withUniqueElem()
KeyCollectionImpl.BuilderImplwithUniqueElem in class KeyCollectionImpl.BuilderImpl<E>