Package cc.redberry.rings.util
Class ListWrapper<Poly>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<Poly>
-
- cc.redberry.rings.util.ListWrapper<Poly>
-
- All Implemented Interfaces:
Iterable<Poly>
,Collection<Poly>
,List<Poly>
public class ListWrapper<Poly> extends AbstractList<Poly>
A simple list wrapper
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description ListWrapper(List<Poly> list)
-
Method Summary
Modifier and Type Method Description void
add(int index, Poly element)
boolean
add(Poly poly)
boolean
addAll(int index, Collection<? extends Poly> c)
boolean
addAll(Collection<? extends Poly> c)
void
clear()
boolean
contains(Object o)
boolean
containsAll(Collection<?> c)
boolean
equals(Object o)
void
forEach(Consumer<? super Poly> action)
Poly
get(int index)
int
hashCode()
int
indexOf(Object o)
boolean
isEmpty()
Iterator<Poly>
iterator()
int
lastIndexOf(Object o)
ListIterator<Poly>
listIterator()
ListIterator<Poly>
listIterator(int index)
Stream<Poly>
parallelStream()
Poly
remove(int index)
boolean
remove(Object o)
boolean
removeAll(Collection<?> c)
boolean
removeIf(Predicate<? super Poly> filter)
protected void
removeRange(int fromIndex, int toIndex)
void
replaceAll(UnaryOperator<Poly> operator)
boolean
retainAll(Collection<?> c)
Poly
set(int index, Poly element)
int
size()
void
sort(Comparator<? super Poly> c)
Spliterator<Poly>
spliterator()
Stream<Poly>
stream()
List<Poly>
subList(int fromIndex, int toIndex)
Object[]
toArray()
<T> T[]
toArray(T[] a)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
toArray
-
-
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceCollection<Poly>
- Specified by:
isEmpty
in interfaceList<Poly>
- Overrides:
isEmpty
in classAbstractCollection<Poly>
-
contains
public boolean contains(Object o)
- Specified by:
contains
in interfaceCollection<Poly>
- Specified by:
contains
in interfaceList<Poly>
- Overrides:
contains
in classAbstractCollection<Poly>
-
toArray
public Object[] toArray()
- Specified by:
toArray
in interfaceCollection<Poly>
- Specified by:
toArray
in interfaceList<Poly>
- Overrides:
toArray
in classAbstractCollection<Poly>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArray
in interfaceCollection<Poly>
- Specified by:
toArray
in interfaceList<Poly>
- Overrides:
toArray
in classAbstractCollection<Poly>
-
remove
public boolean remove(Object o)
- Specified by:
remove
in interfaceCollection<Poly>
- Specified by:
remove
in interfaceList<Poly>
- Overrides:
remove
in classAbstractCollection<Poly>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAll
in interfaceCollection<Poly>
- Specified by:
containsAll
in interfaceList<Poly>
- Overrides:
containsAll
in classAbstractCollection<Poly>
-
addAll
public boolean addAll(Collection<? extends Poly> c)
- Specified by:
addAll
in interfaceCollection<Poly>
- Specified by:
addAll
in interfaceList<Poly>
- Overrides:
addAll
in classAbstractCollection<Poly>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAll
in interfaceCollection<Poly>
- Specified by:
removeAll
in interfaceList<Poly>
- Overrides:
removeAll
in classAbstractCollection<Poly>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAll
in interfaceCollection<Poly>
- Specified by:
retainAll
in interfaceList<Poly>
- Overrides:
retainAll
in classAbstractCollection<Poly>
-
replaceAll
public void replaceAll(UnaryOperator<Poly> operator)
-
sort
public void sort(Comparator<? super Poly> c)
-
spliterator
public Spliterator<Poly> spliterator()
-
add
public boolean add(Poly poly)
- Specified by:
add
in interfaceCollection<Poly>
- Specified by:
add
in interfaceList<Poly>
- Overrides:
add
in classAbstractList<Poly>
-
add
public void add(int index, Poly element)
-
remove
public Poly remove(int index)
-
indexOf
public int indexOf(Object o)
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOf
in interfaceList<Poly>
- Overrides:
lastIndexOf
in classAbstractList<Poly>
-
clear
public void clear()
- Specified by:
clear
in interfaceCollection<Poly>
- Specified by:
clear
in interfaceList<Poly>
- Overrides:
clear
in classAbstractList<Poly>
-
addAll
public boolean addAll(int index, Collection<? extends Poly> c)
-
listIterator
public ListIterator<Poly> listIterator()
- Specified by:
listIterator
in interfaceList<Poly>
- Overrides:
listIterator
in classAbstractList<Poly>
-
listIterator
public ListIterator<Poly> listIterator(int index)
- Specified by:
listIterator
in interfaceList<Poly>
- Overrides:
listIterator
in classAbstractList<Poly>
-
equals
public boolean equals(Object o)
- Specified by:
equals
in interfaceCollection<Poly>
- Specified by:
equals
in interfaceList<Poly>
- Overrides:
equals
in classAbstractList<Poly>
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfaceCollection<Poly>
- Specified by:
hashCode
in interfaceList<Poly>
- Overrides:
hashCode
in classAbstractList<Poly>
-
removeRange
protected void removeRange(int fromIndex, int toIndex)
- Overrides:
removeRange
in classAbstractList<Poly>
-
get
public Poly get(int index)
-
size
public int size()
- Specified by:
size
in interfaceCollection<Poly>
- Specified by:
size
in interfaceList<Poly>
- Specified by:
size
in classAbstractCollection<Poly>
-
toString
public String toString()
- Overrides:
toString
in classAbstractCollection<Poly>
-
-