public static class KeySet.Builder<E> extends KeyCollection.Builder<E>
KeyCollectionImpl.BuilderImpl.KeyMapBuilder<E,K>| Constructor and Description |
|---|
Builder()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
KeySet<E> |
build() |
KeySet.Builder<E> |
withAfterDeleteTrigger(java.util.function.Consumer<E> trigger)
Specify delete trigger.
|
KeySet.Builder<E> |
withAfterInsertTrigger(java.util.function.Consumer<E> trigger)
Specify insert trigger.
|
KeySet.Builder<E> |
withBeforeDeleteTrigger(java.util.function.Consumer<E> trigger)
Specify delete trigger.
|
KeySet.Builder<E> |
withBeforeInsertTrigger(java.util.function.Consumer<E> trigger)
Specify insert trigger.
|
KeySet.Builder<E> |
withCapacity(int capacity)
Specify initial capacity.
|
KeySet.Builder<E> |
withConstraint(java.util.function.Predicate<E> constraint)
Specify element constraint.
|
KeySet.Builder<E> |
withContent(java.util.Collection<? extends E> elements)
Specify elements added to the collection upon creation.
|
KeySet.Builder<E> |
withContent(E... elements)
Specify elements added to the collection upon creation.
|
KeySet.Builder<E> |
withElemCount(boolean count)
Specifies that the collection only counts the number of occurrences
of equal elements, but does not store the elements themselves.
|
KeySet.Builder<E> |
withElemDuplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
KeySet.Builder<E> |
withElemDuplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
KeySet.Builder<E> |
withElemNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
KeySet.Builder<E> |
withElemSet()
Add element map (with ident mapper).
|
KeySet.Builder<E> |
withElemSort(boolean sort)
Specify that the element set should be sorted using the natural comparator.
|
KeySet.Builder<E> |
withElemSort(java.util.Comparator<? super E> comparator)
Set comparator to use for sorting the element set.
|
KeySet.Builder<E> |
withElemSort(java.util.Comparator<? super E> comparator,
boolean sortNullsFirst)
Set comparator to use for sorting the element set.
|
KeySet.Builder<E> |
withMaxSize(int maxSize)
Specify maximum size of collection.
|
KeySet.Builder<E> |
withNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
KeySet.Builder<E> |
withOrderByElem(boolean orderBy)
Specifies that the collection will have the order of the element set.
|
KeySet.Builder<E> |
withPrimaryElem()
Specify the element to be a primary key.
|
KeySet.Builder<E> |
withSetBehavior(boolean setBehavior)
Specifies that the collection behaves like a
Set on adding elements, i.e. |
KeySet.Builder<E> |
withUniqueElem()
Specify the element to be a unique key.
|
withKey1Duplicates, withKey1Duplicates, withKey1Null, withKey1Sort, withKey2Duplicates, withKey2Duplicates, withKey2Null, withKey2Sort, withKeyDuplicates, withKeyMap, withKeyNull, withKeySort, withKeySort, withKeySort, withListBig, withListType, withOrderByElem, withOrderByKey, withOrderByKey, withOrderByKey1, withOrderByKey1, withOrderByKey2, withOrderByKey2, withPrimaryKeyMap, withUniqueKeyMap, withWindowSizepublic KeySet<E> build()
build in class KeyCollection.Builder<E>public KeySet.Builder<E> withSetBehavior(boolean setBehavior)
KeyCollectionImpl.BuilderImplSet on adding elements, i.e.
if an element cannot be added due to duplicate or other constraints, no exception is thrown.withSetBehavior in class KeyCollection.Builder<E>setBehavior - true to define set behavior (default is false)public KeySet.Builder<E> withElemDuplicates(boolean allowDuplicates)
KeyCollectionImpl.BuilderImplwithElemDuplicates in class KeyCollection.Builder<E>allowDuplicates - true to allow duplicates (default is true)public KeySet.Builder<E> withElemDuplicates(boolean allowDuplicates, boolean allowDuplicatesNull)
KeyCollectionImpl.BuilderImplwithElemDuplicates in class KeyCollection.Builder<E>allowDuplicates - true to allow duplicates (default is true)allowDuplicatesNull - true to allow duplicate null values (default is true)public KeySet.Builder<E> withNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withElemNull(boolean) does.withNull in class KeyCollection.Builder<E>allowNull - true to allow null elements (default), false to disallowpublic KeySet.Builder<E> withConstraint(java.util.function.Predicate<E> constraint)
KeyCollectionImpl.BuilderImplwithConstraint in class KeyCollection.Builder<E>constraint - constraint element must satisfy, null for none (default)public KeySet.Builder<E> withBeforeInsertTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithBeforeInsertTrigger in class KeyCollection.Builder<E>trigger - insert trigger method, null for none (default)public KeySet.Builder<E> withAfterInsertTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithAfterInsertTrigger in class KeyCollection.Builder<E>trigger - insert trigger method, null for none (default)public KeySet.Builder<E> withBeforeDeleteTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithBeforeDeleteTrigger in class KeyCollection.Builder<E>trigger - delete trigger method, null for none (default)public KeySet.Builder<E> withAfterDeleteTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithAfterDeleteTrigger in class KeyCollection.Builder<E>trigger - delete trigger method, null for none (default)public KeySet.Builder<E> withCapacity(int capacity)
KeyCollectionImpl.BuilderImplwithCapacity in class KeyCollection.Builder<E>capacity - initial capacitypublic KeySet.Builder<E> withContent(java.util.Collection<? extends E> elements)
KeyCollectionImpl.BuilderImplwithContent in class KeyCollection.Builder<E>elements - initial elementspublic KeySet.Builder<E> withContent(E... elements)
KeyCollectionImpl.BuilderImplwithContent in class KeyCollection.Builder<E>elements - initial elementspublic KeySet.Builder<E> withMaxSize(int maxSize)
KeyCollectionImpl.BuilderImplwithMaxSize in class KeyCollection.Builder<E>maxSize - maximum sizepublic KeySet.Builder<E> withElemCount(boolean count)
KeyCollectionImpl.BuilderImplwithElemCount in class KeyCollection.Builder<E>count - true to count only number of occurrences (default is false)public KeySet.Builder<E> withElemSet()
Note that a KeyCollection always has an element set, so this call is not necessary.
Note that a KeyCollection always has an element set, so this call is not necessary.
withElemSet in class KeyCollection.Builder<E>public KeySet.Builder<E> withOrderByElem(boolean orderBy)
KeyCollectionImpl.BuilderImplwithOrderByElem in class KeyCollection.Builder<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 KeySet.Builder<E> withElemNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withNull(boolean) does not.withElemNull in class KeyCollection.Builder<E>allowNull - true to allow null elements, false to disallow (default is true)public KeySet.Builder<E> withElemSort(boolean sort)
KeyCollectionImpl.BuilderImplwithElemSort in class KeyCollection.Builder<E>sort - true to sorted, false for unsorted (default is false)public KeySet.Builder<E> withElemSort(java.util.Comparator<? super E> comparator)
KeyCollectionImpl.BuilderImplwithElemSort in class KeyCollection.Builder<E>comparator - comparator to use for sorting (null for natural comparator)public KeySet.Builder<E> withElemSort(java.util.Comparator<? super E> comparator, boolean sortNullsFirst)
KeyCollectionImpl.BuilderImplwithElemSort in class KeyCollection.Builder<E>comparator - comparator to use for sortingsortNullsFirst - true to sort null values first, false for lastpublic KeySet.Builder<E> withPrimaryElem()
KeyCollectionImpl.BuilderImplwithPrimaryElem in class KeyCollection.Builder<E>public KeySet.Builder<E> withUniqueElem()
KeyCollectionImpl.BuilderImplwithUniqueElem in class KeyCollection.Builder<E>