|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.olemiss.cs211.List<T>
public class List<T>
A simple list class
Constructor Summary | |
---|---|
List()
Creates an empty list. |
Method Summary | |
---|---|
void |
add(T o)
Add the given object to the list. |
List<T> |
clone()
Copies this list. |
T |
find(java.lang.Object k)
Returns the object that is equal to the given key if it is found in the list. |
java.util.Iterator<T> |
iterator()
Returns an iterator for this list. |
static void |
main(java.lang.String[] args)
|
int |
size()
Return the number of elements in this list. |
java.lang.String |
toString()
Write this list to a string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public List()
Method Detail |
---|
public void add(T o)
o
- the object to add.public java.lang.String toString()
toString
in class java.lang.Object
public int size()
public java.util.Iterator<T> iterator()
iterator
in interface java.lang.Iterable<T>
public List<T> clone()
clone
in class java.lang.Object
public T find(java.lang.Object k)
k
- an object that serves as a key.public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |