Package eu.bandm.tools.ops
Class ArraySortedList<A>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<A>
eu.bandm.tools.ops.ArraySortedList<A>
- All Implemented Interfaces:
SortedList<A>
,Iterable<A>
,Collection<A>
,List<A>
- Direct Known Subclasses:
ArraySortedEntryList
Implementation of a sorted list by an underlying array.
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionArraySortedList
(int capacity) ArraySortedList
(A... elems) ArraySortedList
(Comparator<? super A> comparator) ArraySortedList
(Comparator<? super A> comparator, int capacity) ArraySortedList
(Comparator<? super A> comparator, A... elems) ArraySortedList
(Comparator<? super A> comparator, List<? extends A> elems) ArraySortedList
(List<? extends A> elems) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
addAll
(SortedList<? extends A> more) boolean
boolean
addUnchecked
(A a) asSet()
Comparator<? super A>
boolean
Delegate directly to superclass.first()
get
(int index) int
hashCode()
Delegate directly to superclass.last()
int
size()
Methods inherited from class java.util.AbstractList
add, addAll, clear, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
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
add, addAll, addAll, clear, contains, containsAll, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
ArraySortedList
public ArraySortedList() -
ArraySortedList
public ArraySortedList(int capacity) -
ArraySortedList
-
ArraySortedList
-
ArraySortedList
-
ArraySortedList
-
ArraySortedList
-
ArraySortedList
-
-
Method Details
-
equals
Delegate directly to superclass. Only semantics shall be subject to equals(), not the implementation.- Specified by:
equals
in interfaceCollection<A>
- Specified by:
equals
in interfaceList<A>
- Overrides:
equals
in classAbstractList<A>
-
hashCode
public int hashCode()Delegate directly to superclass. @see #equals(Object)- Specified by:
hashCode
in interfaceCollection<A>
- Specified by:
hashCode
in interfaceList<A>
- Overrides:
hashCode
in classAbstractList<A>
-
size
public int size()- Specified by:
size
in interfaceCollection<A>
- Specified by:
size
in interfaceList<A>
- Specified by:
size
in classAbstractCollection<A>
-
get
-
first
- Specified by:
first
in interfaceSortedList<A>
-
last
- Specified by:
last
in interfaceSortedList<A>
-
comparator
- Specified by:
comparator
in interfaceSortedList<A>
-
add
- Specified by:
add
in interfaceCollection<A>
- Specified by:
add
in interfaceList<A>
- Overrides:
add
in classAbstractList<A>
-
addUnchecked
-
addAll
-
addAll
-
asSet
-