Package net.hydromatic.morel.util
Class ComparableSingletonList<E extends Comparable<E>>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
net.hydromatic.morel.util.ComparableSingletonList<E>
- Type Parameters:
E- Element type
- All Implemented Interfaces:
Comparable<ComparableSingletonList<E>>,Iterable<E>,Collection<E>,List<E>,SequencedCollection<E>
public class ComparableSingletonList<E extends Comparable<E>>
extends AbstractList<E>
implements Comparable<ComparableSingletonList<E>>
A comparable singleton list.
-
Field Summary
FieldsFields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintget(int index) static <E extends Comparable<E>>
ComparableSingletonList<E> of(E e) Creates a ComparableSingletonList.intsize()Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subListMethods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toStringMethods 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
addAll, addFirst, addLast, contains, containsAll, getFirst, getLast, isEmpty, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, sort, spliterator, toArray, toArray
-
Field Details
-
element
-
-
Constructor Details
-
ComparableSingletonList
ComparableSingletonList(E element)
-
-
Method Details
-
of
Creates a ComparableSingletonList. -
get
- Specified by:
getin interfaceList<E extends Comparable<E>>- Specified by:
getin classAbstractList<E extends Comparable<E>>
-
size
public int size()- Specified by:
sizein interfaceCollection<E extends Comparable<E>>- Specified by:
sizein interfaceList<E extends Comparable<E>>- Specified by:
sizein classAbstractCollection<E extends Comparable<E>>
-
compareTo
- Specified by:
compareToin interfaceComparable<E extends Comparable<E>>
-