public class XmlSimpleList
extends java.lang.Object
implements java.util.List, java.io.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(java.util.List list)
Constructs an immutable XmlSimpleList that wraps (does not copy)
the given
List. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(int index,
java.lang.Object element)
Unsupported because this list is immutable.
|
boolean |
add(java.lang.Object o)
Unsupported because this list is immutable.
|
boolean |
addAll(java.util.Collection coll)
Unsupported because this list is immutable.
|
boolean |
addAll(int index,
java.util.Collection c)
Unsupported because this list is immutable.
|
void |
clear()
Unsupported because this list is immutable.
|
boolean |
contains(java.lang.Object o)
True if the list is contains an object equal to o.
|
boolean |
containsAll(java.util.Collection coll)
True if the list is contains all the objects in the given collection.
|
boolean |
equals(java.lang.Object o)
Two XmlSimpleLists are equal if all their items are equal.
|
java.lang.Object |
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(java.lang.Object o)
Returns index of the first occurance of an object equal to o.
|
boolean |
isEmpty()
True if the list is empty.
|
java.util.Iterator |
iterator()
Returns an iterator over the elements in this list in proper sequence.
|
int |
lastIndexOf(java.lang.Object o)
Returns index of the last occurance of an object equal to o.
|
java.util.ListIterator |
listIterator()
Returns a list iterator of the elements in this list in proper sequence.
|
java.util.ListIterator |
listIterator(int index)
Returns a list iterator of the elements in this list in proper sequence, starting at the specified position in this list.
|
java.lang.Object |
remove(int index)
Unsupported because this list is immutable.
|
boolean |
remove(java.lang.Object o)
Unsupported because this list is immutable.
|
boolean |
removeAll(java.util.Collection coll)
Unsupported because this list is immutable.
|
boolean |
retainAll(java.util.Collection coll)
Unsupported because this list is immutable.
|
java.lang.Object |
set(int index,
java.lang.Object element)
Unsupported because this list is immutable.
|
int |
size()
Returns the number of elements in this list.
|
java.util.List |
subList(int from,
int to)
Returns a view of the portion of this list between the specified fromIndex, inclusive, and toIndex, exclusive.
|
java.lang.Object[] |
toArray()
Copies the collection to an array.
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
Copies the collection to an array of a specified type.
|
java.lang.String |
toString()
Returns a space-separated list of the string representations of all
the items in the list.
|
public XmlSimpleList(java.util.List list)
List. All non-mutating methods delegate to
the underlying List instance.public int size()
size in interface java.util.Collectionsize in interface java.util.Listpublic boolean isEmpty()
isEmpty in interface java.util.CollectionisEmpty in interface java.util.Listpublic boolean contains(java.lang.Object o)
contains in interface java.util.Collectioncontains in interface java.util.Listpublic boolean containsAll(java.util.Collection coll)
containsAll in interface java.util.CollectioncontainsAll in interface java.util.Listpublic java.lang.Object[] toArray()
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.CollectiontoArray in interface java.util.Listpublic boolean add(java.lang.Object o)
add in interface java.util.Collectionadd in interface java.util.Listpublic boolean addAll(java.util.Collection coll)
addAll in interface java.util.CollectionaddAll in interface java.util.Listpublic boolean remove(java.lang.Object o)
remove in interface java.util.Collectionremove in interface java.util.Listpublic boolean removeAll(java.util.Collection coll)
removeAll in interface java.util.CollectionremoveAll in interface java.util.Listpublic boolean retainAll(java.util.Collection coll)
retainAll in interface java.util.CollectionretainAll in interface java.util.Listpublic void clear()
clear in interface java.util.Collectionclear in interface java.util.Listpublic java.lang.Object get(int index)
get in interface java.util.Listpublic java.lang.Object set(int index,
java.lang.Object element)
set in interface java.util.Listpublic void add(int index,
java.lang.Object element)
add in interface java.util.Listpublic java.lang.Object remove(int index)
remove in interface java.util.Listpublic int indexOf(java.lang.Object o)
indexOf in interface java.util.Listpublic int lastIndexOf(java.lang.Object o)
lastIndexOf in interface java.util.Listpublic boolean addAll(int index,
java.util.Collection c)
addAll in interface java.util.Listpublic java.util.List subList(int from,
int to)
subList in interface java.util.Listpublic java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.Collectioniterator in interface java.util.Listpublic java.util.ListIterator listIterator()
listIterator in interface java.util.Listpublic java.util.ListIterator listIterator(int index)
listIterator in interface java.util.Listpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collectionequals in interface java.util.Listequals in class java.lang.Objectpublic int hashCode()
hashCode in interface java.util.CollectionhashCode in interface java.util.ListhashCode in class java.lang.Object