Package org.takes.misc
Class VerboseList<T>
- java.lang.Object
-
- org.takes.misc.VerboseList<T>
-
- Type Parameters:
T
- Type of item
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,List<T>
public final class VerboseList<T> extends Object implements List<T>
Verbose List that wraps OutOfBoundsException with custom message.- Since:
- 0.31.1
-
-
Constructor Summary
Constructors Constructor Description VerboseList(List<T> list, org.cactoos.Text msg)
Ctor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(int index, T element)
boolean
add(T item)
boolean
addAll(int index, Collection<? extends T> coll)
boolean
addAll(Collection<? extends T> coll)
void
clear()
boolean
contains(Object obj)
boolean
containsAll(Collection<?> coll)
T
get(int index)
int
indexOf(Object obj)
boolean
isEmpty()
Iterator<T>
iterator()
int
lastIndexOf(Object obj)
ListIterator<T>
listIterator()
ListIterator<T>
listIterator(int index)
T
remove(int index)
boolean
remove(Object obj)
boolean
removeAll(Collection<?> coll)
boolean
retainAll(Collection<?> coll)
T
set(int index, T element)
int
size()
List<T>
subList(int fridx, int toidx)
Object[]
toArray()
<E> E[]
toArray(E[] arr)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
equals, hashCode, replaceAll, sort, spliterator
-
-
-
-
Method Detail
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object obj)
-
toArray
public Object[] toArray()
-
toArray
public <E> E[] toArray(E[] arr)
-
add
public boolean add(T item)
-
remove
public boolean remove(Object obj)
-
containsAll
public boolean containsAll(Collection<?> coll)
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
addAll
public boolean addAll(Collection<? extends T> coll)
-
addAll
public boolean addAll(int index, Collection<? extends T> coll)
-
removeAll
public boolean removeAll(Collection<?> coll)
-
retainAll
public boolean retainAll(Collection<?> coll)
-
clear
public void clear()
-
lastIndexOf
public int lastIndexOf(Object obj)
- Specified by:
lastIndexOf
in interfaceList<T>
-
listIterator
public ListIterator<T> listIterator()
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
public ListIterator<T> listIterator(int index)
- Specified by:
listIterator
in interfaceList<T>
-
-