public static class Key1List.Builder<E,K> extends KeyCollectionImpl.BuilderImpl<E>
KeyCollectionImpl.BuilderImpl.KeyMapBuilder<E,K>| Constructor and Description |
|---|
Key1List.Builder()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Key1List<E,K> |
build() |
Key1List.Builder<E,K> |
withAfterDeleteTrigger(IConsumer<E> trigger)
Specify delete trigger.
|
Key1List.Builder<E,K> |
withAfterInsertTrigger(IConsumer<E> trigger)
Specify insert trigger.
|
Key1List.Builder<E,K> |
withBeforeDeleteTrigger(IConsumer<E> trigger)
Specify delete trigger.
|
Key1List.Builder<E,K> |
withBeforeInsertTrigger(IConsumer<E> trigger)
Specify insert trigger.
|
Key1List.Builder<E,K> |
withCapacity(int capacity)
Specify initial capacity.
|
Key1List.Builder<E,K> |
withConstraint(IPredicate<E> constraint)
Specify element constraint.
|
Key1List.Builder<E,K> |
withContent(java.util.Collection<? extends E> elements)
Specify elements added to the collection upon creation.
|
Key1List.Builder<E,K> |
withContent(E... elements)
Specify elements added to the collection upon creation.
|
Key1List.Builder<E,K> |
withElemDuplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
Key1List.Builder<E,K> |
withElemDuplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
Key1List.Builder<E,K> |
withElemNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
Key1List.Builder<E,K> |
withElemSet()
Add element map (with ident mapper).
|
Key1List.Builder<E,K> |
withElemSort(boolean sort)
Specify that the element set should be sorted using the natural comparator.
|
Key1List.Builder<E,K> |
withElemSort(java.util.Comparator<? super E> comparator)
Set comparator to use for sorting the element set.
|
Key1List.Builder<E,K> |
withElemSort(java.util.Comparator<? super E> comparator,
boolean sortNullsFirst)
Set comparator to use for sorting the element set.
|
Key1List.Builder<E,K> |
withKey1Duplicates(boolean allowDuplicates)
Specify whether duplicates are allowed or not.
|
Key1List.Builder<E,K> |
withKey1Duplicates(boolean allowDuplicates,
boolean allowDuplicatesNull)
Specify whether duplicates are allowed or not.
|
Key1List.Builder<E,K> |
withKey1Map(IFunction<? super E,K> mapper)
Add key map.
|
Key1List.Builder<E,K> |
withKey1Null(boolean allowNull)
Specify whether null elements are allowed or not.
|
Key1List.Builder<E,K> |
withKey1Sort(boolean sort)
Set comparator to use for sorting the key map.
|
Key1List.Builder<E,K> |
withKey1Sort(java.util.Comparator<? super K> comparator)
Set comparator to use for sorting the key map.
|
Key1List.Builder<E,K> |
withKey1Sort(java.util.Comparator<? super K> comparator,
boolean sortNullsFirst)
Set comparator to use for sorting the key map.
|
Key1List.Builder<E,K> |
withListBig(boolean bigList)
Specify whether list should be stored in an instance of BigList or GapList.
|
Key1List.Builder<E,K> |
withMaxSize(int maxSize)
Specify maximum size of collection.
|
Key1List.Builder<E,K> |
withNull(boolean allowNull)
Specifies whether null elements are allowed or not.
|
Key1List.Builder<E,K> |
withOrderByElem(boolean orderBy)
Specifies that the collection will have the order of the element set.
|
Key1List.Builder<E,K> |
withOrderByKey1(boolean orderBy)
Specifies that the collection will have the order of the key map.
|
Key1List.Builder<E,K> |
withOrderByKey1(java.lang.Class<?> type)
Specifies that the list will have the order of the key map.
|
Key1List.Builder<E,K> |
withPrimaryElem()
Specify the element to be a primary key.
|
Key1List.Builder<E,K> |
withPrimaryKey1Map(IFunction<? super E,K> mapper)
Specify this key to be a primary key.
|
Key1List.Builder<E,K> |
withUniqueElem()
Specify the element to be a unique key.
|
Key1List.Builder<E,K> |
withUniqueKey1Map(IFunction<? super E,K> mapper)
Specify this key to be a unique key.
|
Key1List.Builder<E,K> |
withWindowSize(int maxSize)
Specify maximum window size of collection.
|
public Key1List.Builder<E,K> withNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withElemNull(boolean) does.allowNull - true to allow null elements (default), false to disallowpublic Key1List.Builder<E,K> withConstraint(IPredicate<E> constraint)
KeyCollectionImpl.BuilderImplconstraint - constraint element must satisfy, null for none (default)public Key1List.Builder<E,K> withBeforeInsertTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - insert trigger method, null for none (default)public Key1List.Builder<E,K> withAfterInsertTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - insert trigger method, null for none (default)public Key1List.Builder<E,K> withBeforeDeleteTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - delete trigger method, null for none (default)public Key1List.Builder<E,K> withAfterDeleteTrigger(IConsumer<E> trigger)
KeyCollectionImpl.BuilderImpltrigger - delete trigger method, null for none (default)public Key1List.Builder<E,K> withCapacity(int capacity)
KeyCollectionImpl.BuilderImplcapacity - initial capacitypublic Key1List.Builder<E,K> withContent(java.util.Collection<? extends E> elements)
KeyCollectionImpl.BuilderImplelements - initial elementspublic Key1List.Builder<E,K> withContent(E... elements)
KeyCollectionImpl.BuilderImplelements - initial elementspublic Key1List.Builder<E,K> withMaxSize(int maxSize)
KeyCollectionImpl.BuilderImplmaxSize - maximum sizepublic Key1List.Builder<E,K> withWindowSize(int maxSize)
KeyCollectionImpl.BuilderImplmaxSize - maximum window sizepublic Key1List.Builder<E,K> withListBig(boolean bigList)
KeyCollectionImpl.BuilderImplbigList - true to store list content in an instance of BigList, false for GapListpublic Key1List.Builder<E,K> withElemSet()
KeyCollectionImpl.BuilderImplpublic Key1List.Builder<E,K> 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 Key1List.Builder<E,K> withElemNull(boolean allowNull)
KeyCollectionImpl.BuilderImplKeyCollectionImpl.BuilderImpl.withNull(boolean) does not.allowNull - true to allow null elements, false to disallow (default is true)public Key1List.Builder<E,K> withElemDuplicates(boolean allowDuplicates)
KeyCollectionImpl.BuilderImplallowDuplicates - true to allow duplicates (default is true)public Key1List.Builder<E,K> 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 Key1List.Builder<E,K> withElemSort(boolean sort)
KeyCollectionImpl.BuilderImplsort - true to sorted, false for unsorted (default is false)public Key1List.Builder<E,K> withElemSort(java.util.Comparator<? super E> comparator)
KeyCollectionImpl.BuilderImplcomparator - comparator to use for sorting (null for natural comparator)public Key1List.Builder<E,K> 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 Key1List.Builder<E,K> withPrimaryElem()
KeyCollectionImpl.BuilderImplpublic Key1List.Builder<E,K> withUniqueElem()
KeyCollectionImpl.BuilderImplpublic Key1List.Builder<E,K> withKey1Map(IFunction<? super E,K> mapper)
mapper - mapper to usepublic Key1List.Builder<E,K> withPrimaryKey1Map(IFunction<? super E,K> mapper)
mapper - mapper to usepublic Key1List.Builder<E,K> withUniqueKey1Map(IFunction<? super E,K> mapper)
mapper - mapper to usepublic Key1List.Builder<E,K> withOrderByKey1(boolean orderBy)
KeyCollectionImpl.BuilderImplorderBy - 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 Key1List.Builder<E,K> withOrderByKey1(java.lang.Class<?> type)
KeyCollectionImpl.BuilderImplint.
The key map 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 Key1List.Builder<E,K> withKey1Null(boolean allowNull)
KeyCollectionImpl.BuilderImplallowNull - true to allow null elements, false to disallowpublic Key1List.Builder<E,K> withKey1Duplicates(boolean allowDuplicates)
KeyCollectionImpl.BuilderImplallowDuplicates - true to allow duplicatespublic Key1List.Builder<E,K> withKey1Duplicates(boolean allowDuplicates, boolean allowDuplicatesNull)
KeyCollectionImpl.BuilderImplallowDuplicates - true to allow duplicatesallowDuplicatesNull - true to allow duplicate null valuespublic Key1List.Builder<E,K> withKey1Sort(boolean sort)
KeyCollectionImpl.BuilderImplsort - true to sort key mappublic Key1List.Builder<E,K> withKey1Sort(java.util.Comparator<? super K> comparator)
comparator - comparator to use for sortingpublic Key1List.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