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 Modifier and Type Field Description List<Poly>listInner list-
Fields inherited from class java.util.AbstractList
modCount
-
-
Constructor Summary
Constructors Constructor Description ListWrapper(List<Poly> list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(int index, Poly element)booleanadd(Poly poly)booleanaddAll(int index, Collection<? extends Poly> c)booleanaddAll(Collection<? extends Poly> c)voidclear()booleancontains(Object o)booleancontainsAll(Collection<?> c)booleanequals(Object o)voidforEach(Consumer<? super Poly> action)Polyget(int index)inthashCode()intindexOf(Object o)booleanisEmpty()Iterator<Poly>iterator()intlastIndexOf(Object o)ListIterator<Poly>listIterator()ListIterator<Poly>listIterator(int index)Stream<Poly>parallelStream()Polyremove(int index)booleanremove(Object o)booleanremoveAll(Collection<?> c)booleanremoveIf(Predicate<? super Poly> filter)protected voidremoveRange(int fromIndex, int toIndex)voidreplaceAll(UnaryOperator<Poly> operator)booleanretainAll(Collection<?> c)Polyset(int index, Poly element)intsize()voidsort(Comparator<? super Poly> c)Spliterator<Poly>spliterator()Stream<Poly>stream()List<Poly>subList(int fromIndex, int toIndex)Object[]toArray()<T> T[]toArray(T[] a)StringtoString()-
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:
isEmptyin interfaceCollection<Poly>- Specified by:
isEmptyin interfaceList<Poly>- Overrides:
isEmptyin classAbstractCollection<Poly>
-
contains
public boolean contains(Object o)
- Specified by:
containsin interfaceCollection<Poly>- Specified by:
containsin interfaceList<Poly>- Overrides:
containsin classAbstractCollection<Poly>
-
toArray
public Object[] toArray()
- Specified by:
toArrayin interfaceCollection<Poly>- Specified by:
toArrayin interfaceList<Poly>- Overrides:
toArrayin classAbstractCollection<Poly>
-
toArray
public <T> T[] toArray(T[] a)
- Specified by:
toArrayin interfaceCollection<Poly>- Specified by:
toArrayin interfaceList<Poly>- Overrides:
toArrayin classAbstractCollection<Poly>
-
remove
public boolean remove(Object o)
- Specified by:
removein interfaceCollection<Poly>- Specified by:
removein interfaceList<Poly>- Overrides:
removein classAbstractCollection<Poly>
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<Poly>- Specified by:
containsAllin interfaceList<Poly>- Overrides:
containsAllin classAbstractCollection<Poly>
-
addAll
public boolean addAll(Collection<? extends Poly> c)
- Specified by:
addAllin interfaceCollection<Poly>- Specified by:
addAllin interfaceList<Poly>- Overrides:
addAllin classAbstractCollection<Poly>
-
removeAll
public boolean removeAll(Collection<?> c)
- Specified by:
removeAllin interfaceCollection<Poly>- Specified by:
removeAllin interfaceList<Poly>- Overrides:
removeAllin classAbstractCollection<Poly>
-
retainAll
public boolean retainAll(Collection<?> c)
- Specified by:
retainAllin interfaceCollection<Poly>- Specified by:
retainAllin interfaceList<Poly>- Overrides:
retainAllin 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:
addin interfaceCollection<Poly>- Specified by:
addin interfaceList<Poly>- Overrides:
addin 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:
lastIndexOfin interfaceList<Poly>- Overrides:
lastIndexOfin classAbstractList<Poly>
-
clear
public void clear()
- Specified by:
clearin interfaceCollection<Poly>- Specified by:
clearin interfaceList<Poly>- Overrides:
clearin classAbstractList<Poly>
-
addAll
public boolean addAll(int index, Collection<? extends Poly> c)
-
listIterator
public ListIterator<Poly> listIterator()
- Specified by:
listIteratorin interfaceList<Poly>- Overrides:
listIteratorin classAbstractList<Poly>
-
listIterator
public ListIterator<Poly> listIterator(int index)
- Specified by:
listIteratorin interfaceList<Poly>- Overrides:
listIteratorin classAbstractList<Poly>
-
equals
public boolean equals(Object o)
- Specified by:
equalsin interfaceCollection<Poly>- Specified by:
equalsin interfaceList<Poly>- Overrides:
equalsin classAbstractList<Poly>
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfaceCollection<Poly>- Specified by:
hashCodein interfaceList<Poly>- Overrides:
hashCodein classAbstractList<Poly>
-
removeRange
protected void removeRange(int fromIndex, int toIndex)- Overrides:
removeRangein classAbstractList<Poly>
-
get
public Poly get(int index)
-
size
public int size()
- Specified by:
sizein interfaceCollection<Poly>- Specified by:
sizein interfaceList<Poly>- Specified by:
sizein classAbstractCollection<Poly>
-
toString
public String toString()
- Overrides:
toStringin classAbstractCollection<Poly>
-
-