Class TupleList<T>
- java.lang.Object
-
- org.optaplanner.constraint.streams.bavet.common.collection.TupleList<T>
-
- Type Parameters:
T- The element type. Often a tuple.
public final class TupleList<T> extends Object
Different fromLinkedListbecause nodes/indexes are allowed to directly referenceTupleListEntryinstances to avoid the lookup by index cost. Also doesn't implement theListinterface.
-
-
Constructor Summary
Constructors Constructor Description TupleList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TupleListEntry<T>add(T tuple)TupleListEntry<T>first()voidforEach(Consumer<T> tupleConsumer)TupleListEntry<T>last()voidremove(TupleListEntry<T> entry)intsize()StringtoString()
-
-
-
Method Detail
-
add
public TupleListEntry<T> add(T tuple)
-
remove
public void remove(TupleListEntry<T> entry)
-
first
public TupleListEntry<T> first()
-
last
public TupleListEntry<T> last()
-
size
public int size()
-
-