public class XmlSimpleList<T> extends Object implements List<T>, Serializable
List
returned for XML simple list values.
XmlSimpleList implements an equals() and hashCode() that compare list contents, so two XmlSimpleLists are the same if they have the same values in the same order.
Constructor and Description |
---|
XmlSimpleList(List<T> list)
Constructs an immutable XmlSimpleList that wraps (does not copy)
the given
List . |
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
Object element)
Unsupported because this list is immutable.
|
boolean |
add(Object o)
Unsupported because this list is immutable.
|
boolean |
addAll(Collection coll)
Unsupported because this list is immutable.
|
boolean |
addAll(int index,
Collection c)
Unsupported because this list is immutable.
|
void |
clear()
Unsupported because this list is immutable.
|
boolean |
contains(Object o)
True if the list is contains an object equal to o.
|
boolean |
containsAll(Collection coll)
True if the list is contains all the objects in the given collection.
|
boolean |
equals(Object o)
Two XmlSimpleLists are equal if all their items are equal.
|
T |
get(int index)
Returns the object at the specified position in this list.
|
int |
hashCode()
Combines the hash codes of all the list items.
|
int |
indexOf(Object o)
Returns index of the first occurance of an object equal to o.
|
boolean |
isEmpty()
True if the list is empty.
|
Iterator<T> |
iterator()
Returns an iterator over the elements in this list in proper sequence.
|
int |
lastIndexOf(Object o)
Returns index of the last occurance of an object equal to o.
|
ListIterator<T> |
listIterator()
Returns a list iterator of the elements in this list in proper sequence.
|
ListIterator<T> |
listIterator(int index)
Returns a list iterator of the elements in this list in proper sequence, starting at the specified position in this list.
|
T |
remove(int index)
Unsupported because this list is immutable.
|
boolean |
remove(Object o)
Unsupported because this list is immutable.
|
boolean |
removeAll(Collection coll)
Unsupported because this list is immutable.
|
boolean |
retainAll(Collection coll)
Unsupported because this list is immutable.
|
T |
set(int index,
T element)
Unsupported because this list is immutable.
|
int |
size()
Returns the number of elements in this list.
|
List<T> |
subList(int from,
int to)
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
|
Object[] |
toArray()
Copies the collection to an array.
|
<X> X[] |
toArray(X[] a)
Copies the collection to an array of a specified type.
|
String |
toString()
Returns a space-separated list of the string representations of all
the items in the list.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
replaceAll, sort, spliterator
parallelStream, removeIf, stream
public int size()
public boolean isEmpty()
public boolean contains(Object o)
public boolean containsAll(Collection coll)
containsAll
in interface Collection<T>
containsAll
in interface List<T>
public Object[] toArray()
public <X> X[] toArray(X[] a)
public boolean add(Object o)
public boolean addAll(Collection coll)
public boolean remove(Object o)
public boolean removeAll(Collection coll)
public boolean retainAll(Collection coll)
public void clear()
public T get(int index)
public void add(int index, Object element)
public T remove(int index)
public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf
in interface List<T>
public boolean addAll(int index, Collection c)
public List<T> subList(int from, int to)
public Iterator<T> iterator()
public ListIterator<T> listIterator()
listIterator
in interface List<T>
public ListIterator<T> listIterator(int index)
listIterator
in interface List<T>
public String toString()
public boolean equals(Object o)