public static class KeyList.Builder<E> extends KeyCollectionImpl.BuilderImpl<E>
KeyCollectionImpl.BuilderImpl.KeyMapBuilder<E,K>| Constructor and Description |
|---|
KeyList.Builder()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
KeyList<E> |
build()
Create collection with specified options.
|
KeyList.Builder<E> |
withAfterDeleteTrigger(IConsumer<E> trigger)
Specify delete trigger.
|
KeyList.Builder<E> |
withAfterInsertTrigger(IConsumer<E> trigger)
Specify insert trigger.
|
KeyList.Builder<E> |
withBeforeDeleteTrigger(IConsumer<E> trigger)
Specify delete trigger.
|
KeyList.Builder<E> |
withBeforeInsertTrigger(IConsumer<E> trigger)
Specify insert trigger.
|
KeyList.Builder<E> |
withCapacity(int capacity)
Specify initial capacity.
|
KeyList.Builder<E> |
withConstraint(IPredicate<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.
|
public KeyList.Builder<E> withNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withElemNull(boolean) does.allowNull - true to allow null elements (default), false to disallowpublic KeyList.Builder<E> withConstraint(IPredicate<E> constraint)
KeyCollectionImpl.BuilderImplconstraint - constraint element must satisfy, null for none (default)public KeyList.Builder<E> withBeforeInsertTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - insert trigger method, null for none (default)public KeyList.Builder<E> withAfterInsertTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - insert trigger method, null for none (default)public KeyList.Builder<E> withBeforeDeleteTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - delete trigger method, null for none (default)public KeyList.Builder<E> withAfterDeleteTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - delete trigger method, null for none (default)public KeyList.Builder<E> withCapacity(int capacity)
KeyCollectionImpl.BuilderImplcapacity - initial capacitypublic KeyList.Builder<E> withContent(java.util.Collection<? extends E> elements)
KeyCollectionImpl.BuilderImplelements - initial elementspublic KeyList.Builder<E> withContent(E... elements)
KeyCollectionImpl.BuilderImplelements - initial elementspublic KeyList.Builder<E> withMaxSize(int maxSize)
KeyCollectionImpl.BuilderImplmaxSize - maximum sizepublic KeyList.Builder<E> withWindowSize(int maxSize)
KeyCollectionImpl.BuilderImplmaxSize - maximum window sizepublic KeyList.Builder<E> withListBig(boolean bigList)
KeyCollectionImpl.BuilderImplbigList - true to store list content in an instance of BigList, false for GapListpublic KeyList.Builder<E> withListType(java.lang.Class<?> type)
KeyCollectionImpl.BuilderImpltype - primitive type to use for listpublic KeyList.Builder<E> withElemSet()
KeyCollectionImpl.BuilderImplpublic KeyList.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 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.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.allowNull - true to allow null elements, false to disallow (default is true)public KeyList.Builder<E> withElemDuplicates(boolean allowDuplicates)
KeyCollectionImpl.BuilderImplallowDuplicates - true to allow duplicates (default is true)public KeyList.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 KeyList.Builder<E> withElemSort(boolean sort)
KeyCollectionImpl.BuilderImplsort - true to sorted, false for unsorted (default is false)public KeyList.Builder<E> withElemSort(java.util.Comparator<? super E> comparator)
KeyCollectionImpl.BuilderImplcomparator - comparator to use for sorting (null for natural comparator)public KeyList.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 KeyList.Builder<E> withPrimaryElem()
KeyCollectionImpl.BuilderImplpublic KeyList.Builder<E> withUniqueElem()
KeyCollectionImpl.BuilderImpl