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