public static class Key1Collection.Builder<E,K> extends KeyCollectionImpl.BuilderImpl<E>
KeyCollectionImpl.BuilderImpl.KeyMapBuilder<E,K>| Constructor and Description |
|---|
Builder()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Key1Collection<E,K> |
build() |
Key1Collection.Builder<E,K> |
withAfterDeleteTrigger(java.util.function.Consumer<E> trigger)
Specify delete trigger.
|
Key1Collection.Builder<E,K> |
withAfterInsertTrigger(java.util.function.Consumer<E> trigger)
Specify insert trigger.
|
Key1Collection.Builder<E,K> |
withBeforeDeleteTrigger(java.util.function.Consumer<E> trigger)
Specify delete trigger.
|
Key1Collection.Builder<E,K> |
withBeforeInsertTrigger(java.util.function.Consumer<E> trigger)
Specify insert trigger.
|
Key1Collection.Builder<E,K> |
withCapacity(int capacity)
Specify initial capacity.
|
Key1Collection.Builder<E,K> |
withConstraint(java.util.function.Predicate<E> constraint)
Specify element constraint.
|
Key1Collection.Builder<E,K> |
withContent(java.util.Collection<? extends E> elements)
Specify elements added to the collection upon creation.
|
Key1Collection.Builder<E,K> |
withContent(E... elements)
Specify elements added to the collection upon creation.
|
Key1Collection.Builder<E,K> |
withElemDuplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
Key1Collection.Builder<E,K> |
withElemDuplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
Key1Collection.Builder<E,K> |
withElemNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
Key1Collection.Builder<E,K> |
withElemSet()
Add element map (with ident mapper).
|
Key1Collection.Builder<E,K> |
withElemSort(boolean sort)
Specify that the element set should be sorted using the natural comparator.
|
Key1Collection.Builder<E,K> |
withElemSort(java.util.Comparator<? super E> comparator)
Set comparator to use for sorting the element set.
|
Key1Collection.Builder<E,K> |
withElemSort(java.util.Comparator<? super E> comparator,
boolean sortNullsFirst)
Set comparator to use for sorting the element set.
|
Key1Collection.Builder<E,K> |
withKey1Duplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
Key1Collection.Builder<E,K> |
withKey1Duplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
Key1Collection.Builder<E,K> |
withKey1Map(java.util.function.Function<? super E,K> mapper)
Add key map.
|
Key1Collection.Builder<E,K> |
withKey1Null(boolean allowNull)
Specify whether null elements are allowed or not.
|
Key1Collection.Builder<E,K> |
withKey1Sort(boolean sort)
Set comparator to use for sorting the key map.
|
Key1Collection.Builder<E,K> |
withKey1Sort(java.util.Comparator<? super K> comparator)
Set comparator to use for sorting the key map.
|
Key1Collection.Builder<E,K> |
withKey1Sort(java.util.Comparator<? super K> comparator,
boolean sortNullsFirst)
Set comparator to use for sorting the key map.
|
Key1Collection.Builder<E,K> |
withMaxSize(int maxSize)
Specify maximum size of collection.
|
Key1Collection.Builder<E,K> |
withNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
Key1Collection.Builder<E,K> |
withOrderByElem(boolean orderBy)
Specifies that the collection will have the order of the element set.
|
Key1Collection.Builder<E,K> |
withOrderByKey1(boolean orderBy)
Specifies that the collection will have the order of the key map.
|
Key1Collection.Builder<E,K> |
withPrimaryElem()
Specify the element to be a primary key.
|
Key1Collection.Builder<E,K> |
withPrimaryKey1Map(java.util.function.Function<? super E,K> mapper)
Specify this key to be a primary key.
|
Key1Collection.Builder<E,K> |
withSetBehavior(boolean setBehavior)
Specifies that the collection behaves like a
Set on adding elements, i.e. |
Key1Collection.Builder<E,K> |
withUniqueElem()
Specify the element to be a unique key.
|
Key1Collection.Builder<E,K> |
withUniqueKey1Map(java.util.function.Function<? super E,K> mapper)
Specify this key to be a unique key.
|
withElemCount, withKey2Duplicates, withKey2Duplicates, withKey2Null, withKey2Sort, withKeyDuplicates, withKeyMap, withKeyNull, withKeySort, withKeySort, withKeySort, withListBig, withListType, withOrderByElem, withOrderByKey, withOrderByKey, withOrderByKey1, withOrderByKey2, withOrderByKey2, withPrimaryKeyMap, withUniqueKeyMap, withWindowSizepublic Key1Collection<E,K> build()
public Key1Collection.Builder<E,K> 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 Key1Collection.Builder<E,K> withConstraint(java.util.function.Predicate<E> constraint)
KeyCollectionImpl.BuilderImplwithConstraint in class KeyCollectionImpl.BuilderImpl<E>constraint - constraint element must satisfy, null for none (default)public Key1Collection.Builder<E,K> withBeforeInsertTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithBeforeInsertTrigger in class KeyCollectionImpl.BuilderImpl<E>trigger - insert trigger method, null for none (default)public Key1Collection.Builder<E,K> withAfterInsertTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithAfterInsertTrigger in class KeyCollectionImpl.BuilderImpl<E>trigger - insert trigger method, null for none (default)public Key1Collection.Builder<E,K> withBeforeDeleteTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithBeforeDeleteTrigger in class KeyCollectionImpl.BuilderImpl<E>trigger - delete trigger method, null for none (default)public Key1Collection.Builder<E,K> withAfterDeleteTrigger(java.util.function.Consumer<E> trigger)
KeyCollectionImpl.BuilderImplwithAfterDeleteTrigger in class KeyCollectionImpl.BuilderImpl<E>trigger - delete trigger method, null for none (default)public Key1Collection.Builder<E,K> withCapacity(int capacity)
KeyCollectionImpl.BuilderImplwithCapacity in class KeyCollectionImpl.BuilderImpl<E>capacity - initial capacitypublic Key1Collection.Builder<E,K> withContent(java.util.Collection<? extends E> elements)
KeyCollectionImpl.BuilderImplwithContent in class KeyCollectionImpl.BuilderImpl<E>elements - initial elementspublic Key1Collection.Builder<E,K> withContent(E... elements)
KeyCollectionImpl.BuilderImplwithContent in class KeyCollectionImpl.BuilderImpl<E>elements - initial elementspublic Key1Collection.Builder<E,K> withMaxSize(int maxSize)
KeyCollectionImpl.BuilderImplwithMaxSize in class KeyCollectionImpl.BuilderImpl<E>maxSize - maximum sizepublic Key1Collection.Builder<E,K> 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 KeyCollectionImpl.BuilderImpl<E>setBehavior - true to define set behavior (default is false)public Key1Collection.Builder<E,K> withElemSet()
KeyCollectionImpl.BuilderImplwithElemSet in class KeyCollectionImpl.BuilderImpl<E>public Key1Collection.Builder<E,K> 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 Key1Collection.Builder<E,K> 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 Key1Collection.Builder<E,K> withElemDuplicates(boolean allowDuplicates)
KeyCollectionImpl.BuilderImplwithElemDuplicates in class KeyCollectionImpl.BuilderImpl<E>allowDuplicates - true to allow duplicates (default is true)public Key1Collection.Builder<E,K> 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 Key1Collection.Builder<E,K> withElemSort(boolean sort)
KeyCollectionImpl.BuilderImplwithElemSort in class KeyCollectionImpl.BuilderImpl<E>sort - true to sorted, false for unsorted (default is false)public Key1Collection.Builder<E,K> 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 Key1Collection.Builder<E,K> 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 Key1Collection.Builder<E,K> withPrimaryElem()
KeyCollectionImpl.BuilderImplwithElemNull(false) and withElemDuplicates(false).withPrimaryElem in class KeyCollectionImpl.BuilderImpl<E>public Key1Collection.Builder<E,K> withUniqueElem()
KeyCollectionImpl.BuilderImplwithElemNull(true) and withElemDuplicates(false, true).withUniqueElem in class KeyCollectionImpl.BuilderImpl<E>public Key1Collection.Builder<E,K> withKey1Map(java.util.function.Function<? super E,K> mapper)
mapper - mapper to usepublic Key1Collection.Builder<E,K> withPrimaryKey1Map(java.util.function.Function<? super E,K> mapper)
withKey1Map(mapper), withKey1Null(false), and withKey1Duplicates(false).mapper - mapper to usepublic Key1Collection.Builder<E,K> withUniqueKey1Map(java.util.function.Function<? super E,K> mapper)
withKey1Map(mapper), withKey1Null(true), and withKey1Duplicates(false, true).mapper - mapper to usepublic Key1Collection.Builder<E,K> withOrderByKey1(boolean orderBy)
KeyCollectionImpl.BuilderImplwithOrderByKey1 in class KeyCollectionImpl.BuilderImpl<E>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)public Key1Collection.Builder<E,K> withKey1Null(boolean allowNull)
KeyCollectionImpl.BuilderImplwithKey1Null in class KeyCollectionImpl.BuilderImpl<E>allowNull - true to allow null elements, false to disallowpublic Key1Collection.Builder<E,K> withKey1Duplicates(boolean allowDuplicates)
KeyCollectionImpl.BuilderImplwithKey1Duplicates in class KeyCollectionImpl.BuilderImpl<E>allowDuplicates - true to allow duplicatespublic Key1Collection.Builder<E,K> withKey1Duplicates(boolean allowDuplicates, boolean allowDuplicatesNull)
KeyCollectionImpl.BuilderImplwithKey1Duplicates in class KeyCollectionImpl.BuilderImpl<E>allowDuplicates - true to allow duplicatesallowDuplicatesNull - true to allow duplicate null valuespublic Key1Collection.Builder<E,K> withKey1Sort(boolean sort)
KeyCollectionImpl.BuilderImplwithKey1Sort in class KeyCollectionImpl.BuilderImpl<E>sort - true to sort key mappublic Key1Collection.Builder<E,K> withKey1Sort(java.util.Comparator<? super K> comparator)
comparator - comparator to use for sortingpublic Key1Collection.Builder<E,K> withKey1Sort(java.util.Comparator<? super K> comparator, boolean sortNullsFirst)
comparator - comparator to use for sortingsortNullsFirst - true if null will be sorted first, false for last