|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.util.XPArrayList
public class XPArrayList
XPArrayList is a wrapper over the ArrayList.
Constructor Summary | |
---|---|
XPArrayList()
Creates an empty list. |
|
XPArrayList(java.util.Collection list)
Constructs a list from a pre-existing ArrayList |
|
XPArrayList(int initialCapacity)
Constructs an empty list with the specified initial capacity. |
Method Summary | |
---|---|
int |
Add(java.lang.Object value)
Appends the specified element to the end of this list. |
void |
AddRange(IXPCollection collection)
Appends all of the elements in the specified Collection to the end of this list. |
void |
Clear()
Removes all elements from this list. |
java.lang.Object |
Clone()
Returns a shallow copy of this XPArrayList instance. |
boolean |
Contains(java.lang.Object value)
Determines whether an element is in this list. |
boolean |
ContainsAll(IXPCollection collection)
Determines if this list contains all of the elements in the specified collection. |
java.lang.Object |
GetElement(int index)
Returns the element at the specified position in this list. |
IXPEnumerator |
GetEnumerator()
Returns an XPEnumerator that can iterate through this list. |
int |
GetSize()
Returns the number of elements in this list. |
java.util.ArrayList |
GetUnderlyingObject()
Returns the platfrom specific object that this class wraps. |
int |
IndexOf(java.lang.Object value)
Returns the index in this list of the first occurrence of the specified element, or -1 if this list does not contain this element. |
void |
Insert(int index,
java.lang.Object value)
Inserts an element into this list at the specified index, shifting the current element at that index and the rest of the list to the right by 1. |
void |
InsertRange(int index,
IXPCollection collection)
Inserts the elements of a collection into this list at the specified index. |
boolean |
IsEmpty()
Tests if this list has no elements. |
int |
LastIndexOf(java.lang.Object _value)
Returns the index of the last occurrence of the specified object in this list. |
void |
Remove(java.lang.Object value)
Removes a single instance of the specified element from this list, if it is present. |
void |
RemoveAll(IXPCollection collection)
Removes from this list all of its elements that are contained in the specified collection. |
java.lang.Object |
RemoveAt(int index)
Removes the element at the specified position in this list. |
void |
RetainAll(IXPCollection collection)
Retains only the elements in this list that are contained in the specified collection. |
java.lang.Object |
SetElement(int index,
java.lang.Object value)
Replaces the element at the specified position in this list with the specified element. |
java.lang.Object[] |
ToArray()
Returns an array containing all of the elements in this list in the correct order. |
java.lang.Object[] |
ToArray(java.lang.Object[] arr)
Returns an array containing all of the elements in this list in the correct order; the runtime type of the returned array is that of the specified array. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XPArrayList()
public XPArrayList(int initialCapacity)
initialCapacity
- the initial capacity of the list.public XPArrayList(java.util.Collection list)
list
- an ArrayList whose contents are added to the internal ArrayList of this XPArrayListMethod Detail |
---|
public int Add(java.lang.Object value)
Add
in interface IXPCollection
value
- The element to be appended to this list.
public void AddRange(IXPCollection collection)
AddRange
in interface IXPCollection
collection
- The collection whose elements should be appended to this list.public void Clear()
Clear
in interface IXPCollection
public java.lang.Object Clone()
public boolean Contains(java.lang.Object value)
Contains
in interface IXPCollection
value
- The element whose presence in this list is to be tested.
public boolean ContainsAll(IXPCollection collection)
ContainsAll
in interface IXPCollection
collection
- The collection to be checked for containment in this list.
public java.lang.Object GetElement(int index)
GetElement
in interface IXPList
index
- index of element to return.
public IXPEnumerator GetEnumerator()
GetEnumerator
in interface IXPCollection
public int GetSize()
GetSize
in interface IXPCollection
public java.util.ArrayList GetUnderlyingObject()
public int IndexOf(java.lang.Object value)
value
- element to search for.
public void Insert(int index, java.lang.Object value)
Insert
in interface IXPCollection
index
- The zero-based index at which value should be inserted.value
- The object to insert.public void InsertRange(int index, IXPCollection collection)
InsertRange
in interface IXPCollection
index
- The zero-based index at which the new elements of the collection
should be inserted.collection
- The collection whose elements should be inserted.public boolean IsEmpty()
IsEmpty
in interface IXPCollection
public int LastIndexOf(java.lang.Object _value)
_value
- The element to search for.
public void Remove(java.lang.Object value)
Remove
in interface IXPCollection
value
- The element that was removed from the list.public void RemoveAll(IXPCollection collection)
RemoveAll
in interface IXPCollection
collection
- The collection that contains the elements to be removed from this list.public java.lang.Object RemoveAt(int index)
RemoveAt
in interface IXPCollection
index
- the index of the element to removed.
public void RetainAll(IXPCollection collection)
RetainAll
in interface IXPCollection
collection
- The collection that contains the elements to be retained in this list.public java.lang.Object SetElement(int index, java.lang.Object value)
SetElement
in interface IXPList
index
- index of element to replace.value
- element to be stored at the specified position.
public java.lang.Object[] ToArray()
ToArray
in interface IXPCollection
public java.lang.Object[] ToArray(java.lang.Object[] arr)
ToArray
in interface IXPCollection
arr
- the array into which the elements of the list are to be stored, if it is big
enough; otherwise, a new array of the same runtime type is allocated for this purpose.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |