E
- the element typepublic class EmptyList<E>
extends java.lang.Object
implements java.util.List<E>
Constructor and Description |
---|
EmptyList()
Instantiates a new empty list.
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(E e)
Adds the.
|
void |
add(int index,
E element)
Adds the.
|
boolean |
addAll(java.util.Collection<? extends E> c)
Adds the all.
|
boolean |
addAll(int index,
java.util.Collection<? extends E> c)
Adds the all.
|
void |
clear()
Clear.
|
boolean |
contains(java.lang.Object o)
Contains.
|
boolean |
containsAll(java.util.Collection<?> c)
Contains all.
|
E |
get(int index)
Gets the.
|
int |
indexOf(java.lang.Object o)
Index of.
|
boolean |
isEmpty()
Checks if is empty.
|
java.util.Iterator<E> |
iterator()
Iterator.
|
int |
lastIndexOf(java.lang.Object o)
Last index of.
|
java.util.ListIterator<E> |
listIterator()
List iterator.
|
java.util.ListIterator<E> |
listIterator(int index)
List iterator.
|
static <T> EmptyList<T> |
newInstance()
New instance.
|
E |
remove(int index)
Removes the.
|
boolean |
remove(java.lang.Object o)
Removes the.
|
boolean |
removeAll(java.util.Collection<?> c)
Removes the all.
|
boolean |
retainAll(java.util.Collection<?> c)
Retain all.
|
E |
set(int index,
E element)
Sets the.
|
int |
size()
Size.
|
java.util.List<E> |
subList(int fromIndex,
int toIndex)
Sub list.
|
java.lang.Object[] |
toArray()
To array.
|
<T> T[] |
toArray(T[] a)
To array.
|
public EmptyList()
Z
- the generic typepublic static <T> EmptyList<T> newInstance()
T
- the generic typepublic int size()
public boolean isEmpty()
public boolean contains(java.lang.Object o)
public java.util.Iterator<E> iterator()
public java.lang.Object[] toArray()
public <T> T[] toArray(T[] a)
public boolean add(E e)
public boolean remove(java.lang.Object o)
public boolean containsAll(java.util.Collection<?> c)
public boolean addAll(java.util.Collection<? extends E> c)
public boolean addAll(int index, java.util.Collection<? extends E> c)
addAll
in interface java.util.List<E>
index
- the indexc
- the cpublic boolean removeAll(java.util.Collection<?> c)
public boolean retainAll(java.util.Collection<?> c)
public void clear()
public E get(int index)
get
in interface java.util.List<E>
index
- the indexpublic E set(int index, E element)
set
in interface java.util.List<E>
index
- the indexelement
- the elementpublic void add(int index, E element)
add
in interface java.util.List<E>
index
- the indexelement
- the elementpublic E remove(int index)
remove
in interface java.util.List<E>
index
- the indexpublic int indexOf(java.lang.Object o)
indexOf
in interface java.util.List<E>
o
- the opublic int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List<E>
o
- the opublic java.util.ListIterator<E> listIterator()
listIterator
in interface java.util.List<E>
public java.util.ListIterator<E> listIterator(int index)
listIterator
in interface java.util.List<E>
index
- the indexCopyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, EspaƱa