|
Palm API Beta 2 |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.kjava.List
A class representing a list of Objects.
Resembles java.util.Vector
.
Constructor Summary | |
List()
Create a new List, and make it small to start. |
|
List(int initSize)
Create a new List. |
Method Summary | |
void |
append(java.lang.Object obj)
Append an Object to the end, expanding the vector if necessary. |
int |
capacity()
/** What is the total capacity of this List? |
java.lang.Object |
elementAt(int i)
What is the Object at a given index? N.B. |
void |
ensureCapacity(int newCap)
Ensure there's room for some number of entries by any means necessary. |
void |
removeAllElements()
Mark the vector as containing no Objects, and drop all references to the Objects previously contained. |
boolean |
setElementAt(java.lang.Object o,
int pos)
Set the indexed element to an Object. |
int |
size()
What is the size of this List? |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public List()
public List(int initSize)
initSize
- the number of initial elements to allocateMethod Detail |
public java.lang.Object elementAt(int i)
i
- the index of the entrypublic int size()
public void append(java.lang.Object obj)
i
- the value of the new datumpublic void removeAllElements()
public int capacity()
size()
public void ensureCapacity(int newCap)
newCap
- the desired new capacitypublic boolean setElementAt(java.lang.Object o, int pos)
Note: this is a replacement operation - it is not an insertion into the list!
o
- the Object to place in the Listpos
- the index at which to place it.
|
Submit a bug or feature The GUI classes provided with this release are NOT part of CLDC, and they will be removed in later releases of this software. Official GUI classes for Java 2 Micro Edition will be defined separately through the Java Community Process and included in J2ME profiles. Java is trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries. Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |