public class OslcJSONObjectList extends ObjectList implements java.util.List
Constructor and Description |
---|
OslcJSONObjectList()
Default Constructor
|
OslcJSONObjectList(com.ibm.json.java.JSONArray c,
java.lang.String osName,
java.lang.String objectPath,
java.lang.String messageType,
UserInfo userInfo)
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<com.ibm.json.java.JSONObject> |
toJSONCollection(java.util.Collection c)
Converts Colleaction to Element Colleaction
|
toElementCollection
public OslcJSONObjectList()
public OslcJSONObjectList(com.ibm.json.java.JSONArray c, java.lang.String osName, java.lang.String objectPath, java.lang.String messageType, UserInfo userInfo)
c
- Original List.public int size()
size
in interface java.util.Collection
size
in interface java.util.List
size
in class ObjectList
public void clear()
clear
in interface java.util.Collection
clear
in interface java.util.List
clear
in class ObjectList
public boolean isEmpty()
isEmpty
in interface java.util.Collection
isEmpty
in interface java.util.List
isEmpty
in class ObjectList
public java.lang.Object[] toArray()
toArray
in interface java.util.Collection
toArray
in interface java.util.List
toArray
in class ObjectList
public java.lang.Object get(int index)
get
in interface java.util.List
get
in class ObjectList
public java.lang.Object remove(int index)
remove
in interface java.util.List
remove
in class ObjectList
index
- Index of object to be removedpublic void add(int index, java.lang.Object element)
add
in interface java.util.List
add
in class ObjectList
index
- Index of object to be addedelement
- Object to be addedpublic int indexOf(java.lang.Object o)
indexOf
in interface java.util.List
indexOf
in class ObjectList
o
- Object to be checkedpublic int lastIndexOf(java.lang.Object o)
lastIndexOf
in interface java.util.List
lastIndexOf
in class ObjectList
o
- Object to be checkedpublic boolean add(java.lang.Object o)
add
in interface java.util.Collection
add
in interface java.util.List
add
in class ObjectList
o
- Object to be addedpublic boolean contains(java.lang.Object o)
contains
in interface java.util.Collection
contains
in interface java.util.List
contains
in class ObjectList
o
- Object to be addedpublic boolean remove(java.lang.Object o)
remove
in interface java.util.Collection
remove
in interface java.util.List
remove
in class ObjectList
o
- Object which as removedpublic boolean addAll(int index, java.util.Collection c)
addAll
in interface java.util.List
addAll
in class ObjectList
index
- Index of collection to be addedc
- Colleaction to be addedpublic boolean addAll(java.util.Collection c)
addAll
in interface java.util.Collection
addAll
in interface java.util.List
addAll
in class ObjectList
c
- Colleaction to be addedpublic boolean containsAll(java.util.Collection c)
containsAll
in interface java.util.Collection
containsAll
in interface java.util.List
containsAll
in class ObjectList
c
- Collection to checkpublic boolean removeAll(java.util.Collection c)
removeAll
in interface java.util.Collection
removeAll
in interface java.util.List
removeAll
in class ObjectList
c
- Collection to removepublic boolean retainAll(java.util.Collection c)
retainAll
in interface java.util.Collection
retainAll
in interface java.util.List
retainAll
in class ObjectList
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
iterator
in class ObjectList
public java.util.List subList(int fromIndex, int toIndex)
subList
in interface java.util.List
subList
in class ObjectList
fromIndex
- from indextoIndex
- to indexpublic java.util.ListIterator listIterator()
listIterator
in interface java.util.List
listIterator
in class ObjectList
public java.util.ListIterator listIterator(int index)
listIterator
in interface java.util.List
listIterator
in class ObjectList
index
- to iteratepublic java.lang.Object set(int index, java.lang.Object element)
set
in interface java.util.List
set
in class ObjectList
public java.lang.Object[] toArray(java.lang.Object[] a)
toArray
in interface java.util.Collection
toArray
in interface java.util.List
toArray
in class ObjectList
a
- object to convertpublic java.util.Collection<com.ibm.json.java.JSONObject> toJSONCollection(java.util.Collection c)
c
- collection to convertpublic java.util.List getList()
getList
in class ObjectList