Package org.apache.calcite.runtime
Class ConsList<E>
java.lang.Object
org.apache.calcite.runtime.ConsList<E>
- Type Parameters:
E- Element type
- All Implemented Interfaces:
Iterable<E>,Collection<E>,List<E>
List that consists of a head element and an immutable non-empty list.
-
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends E> c) booleanaddAll(Collection<? extends E> c) voidclear()booleanbooleancontainsAll(Collection<?> c) booleanget(int index) inthashCode()intbooleanisEmpty()iterator()intlastIndexOf(@Nullable Object o) listIterator(int index) static <E> List<E>Creates a ConsList.remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) intsize()subList(int fromIndex, int toIndex) @PolyNull Object[]toArray()<T> @Nullable T[]toArray(T @Nullable [] a) toList()toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
replaceAll, sort, spliterator
-
Method Details
-
of
Creates a ConsList. It consists of an element pre-pended to another list. If the other list is mutable, creates an immutable copy. -
get
-
size
public int size() -
hashCode
public int hashCode() -
equals
-
toString
-
toList
-
listIterator
- Specified by:
listIteratorin interfaceList<E>
-
iterator
-
listIterator
- Specified by:
listIteratorin interfaceList<E>
-
toArray
-
toArray
public <T> @Nullable T[] toArray(T @Nullable [] a) -
indexOf
-
lastIndexOf
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<E>- Specified by:
isEmptyin interfaceList<E>
-
add
- Specified by:
addin interfaceCollection<E>- Specified by:
addin interfaceList<E>
-
addAll
- Specified by:
addAllin interfaceCollection<E>- Specified by:
addAllin interfaceList<E>
-
addAll
-
removeAll
- Specified by:
removeAllin interfaceCollection<E>- Specified by:
removeAllin interfaceList<E>
-
retainAll
- Specified by:
retainAllin interfaceCollection<E>- Specified by:
retainAllin interfaceList<E>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<E>- Specified by:
clearin interfaceList<E>
-
set
-
add
-
remove
-
subList
-
contains
- Specified by:
containsin interfaceCollection<E>- Specified by:
containsin interfaceList<E>
-
containsAll
- Specified by:
containsAllin interfaceCollection<E>- Specified by:
containsAllin interfaceList<E>
-
remove
- Specified by:
removein interfaceCollection<E>- Specified by:
removein interfaceList<E>
-