public static class KeyCollection.Builder<E> extends KeyCollectionImpl.BuilderImpl<E>
KeyCollectionImpl.BuilderImpl.KeyMapBuilder<E,K>| Constructor and Description |
|---|
KeyCollection.Builder()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
KeyCollection<E> |
build() |
KeyCollection.Builder<E> |
withAfterDeleteTrigger(IConsumer<E> trigger)
Specify delete trigger.
|
KeyCollection.Builder<E> |
withAfterInsertTrigger(IConsumer<E> trigger)
Specify insert trigger.
|
KeyCollection.Builder<E> |
withBeforeDeleteTrigger(IConsumer<E> trigger)
Specify delete trigger.
|
KeyCollection.Builder<E> |
withBeforeInsertTrigger(IConsumer<E> trigger)
Specify insert trigger.
|
KeyCollection.Builder<E> |
withCapacity(int capacity)
Specify initial capacity.
|
KeyCollection.Builder<E> |
withConstraint(IPredicate<E> constraint)
Specify element constraint.
|
KeyCollection.Builder<E> |
withContent(java.util.Collection<? extends E> elements)
Specify elements added to the collection upon creation.
|
KeyCollection.Builder<E> |
withContent(E... elements)
Specify elements added to the collection upon creation.
|
KeyCollection.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.
|
KeyCollection.Builder<E> |
withElemDuplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
KeyCollection.Builder<E> |
withElemDuplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
KeyCollection.Builder<E> |
withElemNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
KeyCollection.Builder<E> |
withElemSet()
Add element map (with ident mapper).
|
KeyCollection.Builder<E> |
withElemSort(boolean sort)
Specify that the element set should be sorted using the natural comparator.
|
KeyCollection.Builder<E> |
withElemSort(java.util.Comparator<? super E> comparator)
Set comparator to use for sorting the element set.
|
KeyCollection.Builder<E> |
withElemSort(java.util.Comparator<? super E> comparator,
boolean sortNullsFirst)
Set comparator to use for sorting the element set.
|
KeyCollection.Builder<E> |
withMaxSize(int maxSize)
Specify maximum size of collection.
|
KeyCollection.Builder<E> |
withNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
KeyCollection.Builder<E> |
withOrderByElem(boolean orderBy)
Specifies that the collection will have the order of the element set.
|
KeyCollection.Builder<E> |
withPrimaryElem()
Specify the element to be a primary key.
|
KeyCollection.Builder<E> |
withUniqueElem()
Specify the element to be a unique key.
|
public KeyCollection.Builder<E> withNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withElemNull(boolean) does.allowNull - true to allow null elements (default), false to disallowpublic KeyCollection.Builder<E> withConstraint(IPredicate<E> constraint)
KeyCollectionImpl.BuilderImplconstraint - constraint element must satisfy, null for none (default)public KeyCollection.Builder<E> withBeforeInsertTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - insert trigger method, null for none (default)public KeyCollection.Builder<E> withAfterInsertTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - insert trigger method, null for none (default)public KeyCollection.Builder<E> withBeforeDeleteTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - delete trigger method, null for none (default)public KeyCollection.Builder<E> withAfterDeleteTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - delete trigger method, null for none (default)public KeyCollection.Builder<E> withCapacity(int capacity)
KeyCollectionImpl.BuilderImplcapacity - initial capacitypublic KeyCollection.Builder<E> withContent(java.util.Collection<? extends E> elements)
KeyCollectionImpl.BuilderImplelements - initial elementspublic KeyCollection.Builder<E> withContent(E... elements)
KeyCollectionImpl.BuilderImplelements - initial elementspublic KeyCollection.Builder<E> withMaxSize(int maxSize)
KeyCollectionImpl.BuilderImplmaxSize - maximum sizepublic KeyCollection.Builder<E> withElemCount(boolean count)
KeyCollectionImpl.BuilderImplcount - true to count only number of occurrences (default is false)public KeyCollection.Builder<E> withElemSet()
KeyCollectionImpl.BuilderImplpublic KeyCollection.Builder<E> withOrderByElem(boolean orderBy)
KeyCollectionImpl.BuilderImplorderBy - 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 KeyCollection.Builder<E> withElemNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withNull(boolean) does not.allowNull - true to allow null elements, false to disallow (default is true)public KeyCollection.Builder<E> withElemDuplicates(boolean allowDuplicates)
KeyCollectionImpl.BuilderImplallowDuplicates - true to allow duplicates (default is true)public KeyCollection.Builder<E> withElemDuplicates(boolean allowDuplicates, boolean allowDuplicatesNull)
KeyCollectionImpl.BuilderImplallowDuplicates - true to allow duplicates (default is true)allowDuplicatesNull - true to allow duplicate null values (default is true)public KeyCollection.Builder<E> withElemSort(boolean sort)
KeyCollectionImpl.BuilderImplsort - true to sorted, false for unsorted (default is false)public KeyCollection.Builder<E> withElemSort(java.util.Comparator<? super E> comparator)
KeyCollectionImpl.BuilderImplcomparator - comparator to use for sorting (null for natural comparator)public KeyCollection.Builder<E> withElemSort(java.util.Comparator<? super E> comparator, boolean sortNullsFirst)
KeyCollectionImpl.BuilderImplcomparator - comparator to use for sortingsortNullsFirst - true to sort null values first, false for lastpublic KeyCollection.Builder<E> withPrimaryElem()
KeyCollectionImpl.BuilderImplpublic KeyCollection.Builder<E> withUniqueElem()
KeyCollectionImpl.BuilderImplpublic KeyCollection<E> build()