|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.piratis.j2me.core.QuickList
Provides a QuickList (Vector/ArrayList) implementation
Nested Class Summary | |
class |
QuickList.Enum
Enumeration implementor |
Constructor Summary | |
QuickList()
Creates a quick list with an initial array size |
|
QuickList(int initialSize)
Creates a QuickList with an initial allocated space |
Method Summary | |
void |
add(java.lang.Object newObject)
Adds a new object to the QuickList |
boolean |
contains(java.lang.Object obj)
Tests if the specified object is a component in this vector. |
java.lang.Object |
elementAt(int intPosition)
Returns the object at the given position |
java.util.Enumeration |
elements()
Gets all the elements of the list |
java.util.Enumeration |
elements(int position)
Gets all the elements of the list from one position |
void |
ensureCapacity(int minCapacity)
Increases the capacity of this quicklist, if necessary, to ensure that it can hold at least the number of components specified by the minimum capacity argument. |
int |
indexOf(java.lang.Object obj)
Searches for the first occurence of the given argument, testing for equality using the equals method. |
void |
insertElementAt(java.lang.Object newObject,
int newPosition)
Inserts the specified object as a component in this vector at the specified index. |
int |
length()
Gets the number of objects within the list |
void |
removeAllElements()
Remove all the objects of the list |
boolean |
removeElement(java.lang.Object obj)
Removes the first occurrence of the argument from this quicklist. |
void |
removeElementAt(int position)
Deletes the component at the specified index. |
void |
setElementAt(java.lang.Object newObject,
int position)
Sets the object at the given index. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public QuickList()
public QuickList(int initialSize)
initialSize
- Method Detail |
public final void add(java.lang.Object newObject)
newObject
- the newObjectpublic final void insertElementAt(java.lang.Object newObject, int newPosition) throws java.lang.IndexOutOfBoundsException
newObject
- the component to insertnewPosition
- where to insert
java.lang.IndexOutOfBoundsException
- if the index was invalidpublic final void setElementAt(java.lang.Object newObject, int position) throws java.lang.IndexOutOfBoundsException
newObject
- new component to setposition
- where to set this component
java.lang.IndexOutOfBoundsException
public final java.lang.Object elementAt(int intPosition) throws java.lang.IndexOutOfBoundsException, java.lang.NullPointerException
intPosition
- the position
java.lang.IndexOutOfBoundsException
java.lang.NullPointerException
public final int length()
public final java.util.Enumeration elements()
public final java.util.Enumeration elements(int position)
position
- initial offset
public final boolean removeElement(java.lang.Object obj)
obj
- the object to be removed
public final void removeElementAt(int position) throws java.lang.IndexOutOfBoundsException
position
- where the object to be remove is located
java.lang.IndexOutOfBoundsException
- if the index was invalidpublic final void removeAllElements()
public final boolean contains(java.lang.Object obj)
obj
- an object
true
if the specified object is a component
in this vector; false
otherwise.public final int indexOf(java.lang.Object obj)
obj
- an object
public final void ensureCapacity(int minCapacity)
minCapacity
- the desired minimum capacity.
|
Copyright(c) 2003-2004 Jordi Martin | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |