Composites.
*/
private final CBuilder builder;
/**
* The comparator used to sort the returned Composites.
*/
private final Comparatortrue if the composites have been build, false otherwise.
*/
private boolean built;
/**
* true if the composites contains some null elements.
*/
private boolean containsNull;
public CompositesBuilder(CBuilder builder, Comparator* If this builder contains 2 composites: A-B and A-C a call to this method to add D will result in the composites: * A-B-D and A-C-D. *
* * @param value the value of the next element * @return thisCompositeBuilder
*/
public CompositesBuilder addElementToAll(ByteBuffer value)
{
checkUpdateable();
if (isEmpty())
elementsList.add(new ArrayList* If this builder contains 2 composites: A-B and A-C a call to this method to add D and E will result in the 4 * composites: A-B-D, A-B-E, A-C-D and A-C-E. *
* * @param values the elements to add * @return thisCompositeBuilder
*/
public CompositesBuilder addEachElementToAll(List* If this builder contains 2 composites: A-B and A-C a call to this method to add [[D, E], [F, G]] will result in the 4 * composites: A-B-D-E, A-B-F-G, A-C-D-E and A-C-F-G. *
* * @param values the elements to add * @return thisCompositeBuilder
*/
public CompositesBuilder addAllElementsToAll(Listtrue if it is possible to add more elements to the composites, false otherwise.
*/
public boolean hasRemaining()
{
return remaining > 0;
}
/**
* Checks if this builder is empty.
*
* @return true if this builder is empty, false otherwise.
*/
public boolean isEmpty()
{
return elementsList.isEmpty();
}
/**
* Checks if the composites contains null elements.
*
* @return true if the composites contains null elements, false otherwise.
*/
public boolean containsNull()
{
return containsNull;
}
/**
* Builds the Composites.
*
* @return the composites
*/
public ListComposites with the specified EOC.
*
* @return the composites
*/
public ListSet instance that will be used to eliminate duplicates and sort the results.
*
* @return a new Set instance.
*/
private Set