public class ObjectList
extends java.lang.Object
implements java.util.List
Constructor and Description |
---|
ObjectList()
Default Constructor
|
ObjectList(java.util.List<org.jdom.Element> c)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
add(int index,
java.lang.Object element)
Adds object to ObjectList for specific index
|
boolean |
add(java.lang.Object o)
Adds object to ObjectList at the end
|
boolean |
addAll(java.util.Collection c)
Adds collection to ObjectList at the end
|
boolean |
addAll(int index,
java.util.Collection c)
Adds collection to ObjectList at the index specified
|
void |
clear()
Clears ObjectList object
|
boolean |
contains(java.lang.Object o)
Checks if ObjectList have object
|
boolean |
containsAll(java.util.Collection c)
Checks if ObjectList have collection
|
java.lang.Object |
get(int index)
Return object for specified index
|
java.util.List |
getList()
Gets List from ObjectList
|
int |
indexOf(java.lang.Object o)
Returns index of the object in ObjectList
|
boolean |
isEmpty()
Return indicator if ObjectList empty or not
|
java.util.Iterator |
iterator()
Get ObjectList iterator
|
int |
lastIndexOf(java.lang.Object o)
Returns last index of the object in ObjectList
|
java.util.ListIterator |
listIterator()
Get ObjectList list iterator
|
java.util.ListIterator |
listIterator(int index)
Get ObjectList list iterator for specific index
|
java.lang.Object |
remove(int index)
Remove object from ObjectList for specified index
|
boolean |
remove(java.lang.Object o)
Remove object from ObjectList for specified index
|
boolean |
removeAll(java.util.Collection c)
Remove collection of objects from ObjectList
|
boolean |
retainAll(java.util.Collection c)
Checks if ObjectList have collection
|
java.lang.Object |
set(int index,
java.lang.Object element) |
int |
size()
Return size of the ObjectList
|
java.util.List |
subList(int fromIndex,
int toIndex)
Gets Sub List from ObjectList from to index
|
java.lang.Object[] |
toArray()
Converts ObjectList to array
|
java.lang.Object[] |
toArray(java.lang.Object[] a)
Converts ObjectList to object array
|
java.util.Collection<org.jdom.Element> |
toElementCollection(java.util.Collection<org.jdom.Element> c)
Converts Collection to Element Collection
|
public ObjectList()
public ObjectList(java.util.List<org.jdom.Element> c)
c
- Original List.public int size()
size
in interface java.util.Collection
size
in interface java.util.List
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
public java.lang.Object get(int index)
get
in interface java.util.List
public java.lang.Object remove(int index)
remove
in interface java.util.List
index
- Index of object to be removedpublic void add(int index, java.lang.Object element)
add
in interface java.util.List
index
- Index of object to be addedelement
- Object to be addedpublic int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
o
- Object to be checkedpublic int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
o
- Object to be checkedpublic boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.List
o
- Object to be addedpublic boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.List
o
- Object to be addedpublic boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.List
o
- Object which as removedpublic boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
index
- Index of collection to be addedc
- Collection to be addedpublic boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
c
- Collection to be addedpublic boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.List
c
- Collection to checkpublic boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
c
- Collection to removepublic boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
c
- Collection to retailpublic java.util.Iterator iterator()
iterator
in interface java.lang.Iterable
iterator
in interface java.util.Collection
iterator
in interface java.util.List
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
fromIndex
- from indextoIndex
- to indexpublic java.util.ListIterator listIterator()
listIterator
in interface java.util.List
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
index
- to iteratepublic java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
toArray
in interface java.util.List
a
- object to convertpublic java.util.Collection<org.jdom.Element> toElementCollection(java.util.Collection<org.jdom.Element> c)
c
- collection to convertpublic java.util.List getList()