Class MultipleDelegateList<T>
- java.lang.Object
-
- ai.timefold.solver.core.impl.heuristic.selector.move.generic.list.kopt.MultipleDelegateList<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
Iterable<T>,Collection<T>,List<T>,RandomAccess
public final class MultipleDelegateList<T> extends Object implements List<T>, RandomAccess
A list that delegates get and set operations to multiple delegates. Add and removal operations are not supported.
-
-
Constructor Summary
Constructors Constructor Description MultipleDelegateList(List<T>... delegates)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactOnAffectedElements(Object[] originalEntities, TriConsumer<Object,Integer,Integer> action)voidadd(int i, T t)booleanadd(T t)booleanaddAll(int i, Collection<? extends T> collection)booleanaddAll(Collection<? extends T> collection)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> collection)booleanequals(Object o)Tget(int i)intgetIndexOfValue(ListVariableDescriptor<?> listVariableDescriptor, SingletonInverseVariableSupply inverseVariableSupply, IndexVariableSupply indexVariableSupply, Object value)inthashCode()intindexOf(Object o)booleanisEmpty()Iterator<T>iterator()intlastIndexOf(Object o)ListIterator<T>listIterator()ListIterator<T>listIterator(int i)voidmoveElementsOfDelegates(int[] newDelegateEndIndices)Tremove(int i)booleanremove(Object o)booleanremoveAll(Collection<?> collection)booleanretainAll(Collection<?> collection)Tset(int i, T t)intsize()MultipleDelegateList<T>subList(int startInclusive, int endExclusive)Object[]toArray()<T1> T1[]toArray(T1[] t1s)StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Constructor Detail
-
MultipleDelegateList
@SafeVarargs public MultipleDelegateList(List<T>... delegates)
-
-
Method Detail
-
getIndexOfValue
public int getIndexOfValue(ListVariableDescriptor<?> listVariableDescriptor, SingletonInverseVariableSupply inverseVariableSupply, IndexVariableSupply indexVariableSupply, Object value)
-
actOnAffectedElements
public void actOnAffectedElements(Object[] originalEntities, TriConsumer<Object,Integer,Integer> action)
-
moveElementsOfDelegates
public void moveElementsOfDelegates(int[] newDelegateEndIndices)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <T1> T1[] toArray(T1[] t1s)
-
containsAll
public boolean containsAll(Collection<?> collection)
- Specified by:
containsAllin interfaceCollection<T>- Specified by:
containsAllin interfaceList<T>
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIteratorin interfaceList<T>
-
listIterator
public ListIterator<T> listIterator(int i)
- Specified by:
listIteratorin interfaceList<T>
-
subList
public MultipleDelegateList<T> subList(int startInclusive, int endExclusive)
-
add
public boolean add(T t)
-
remove
public boolean remove(Object o)
-
addAll
public boolean addAll(Collection<? extends T> collection)
-
addAll
public boolean addAll(int i, Collection<? extends T> collection)
-
removeAll
public boolean removeAll(Collection<?> collection)
-
retainAll
public boolean retainAll(Collection<?> collection)
-
clear
public void clear()
-
equals
public boolean equals(Object o)
-
-