|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kalmeo.util.LinkedList
public class LinkedList
This class represent a linked list.
Nested Class Summary | |
---|---|
class |
LinkedList.LinkedListEnumeration
This class represent a LinkedList enumeration. |
Constructor Summary | |
---|---|
LinkedList()
|
Method Summary | |
---|---|
void |
add(LinkedListItem item)
Add a LinkedListItem to this LinkedList |
void |
add(LinkedListItem item,
LinkedListItem referenceItem,
boolean after)
Add a LinkedListItem to this LinkedList by placing it
after or before the referenceItem according to the
after parameter. |
LinkedList.LinkedListEnumeration |
enumerate(Filter filter)
Return the LinkedList.LinkedListEnumeration |
LinkedListItem |
find(Filter filter)
Returns the best occurence of the corresponding LinkedListItem
witch is acceptable by the filter |
java.util.Vector |
findAll(Filter filter)
Returns a Vector that contains the list of LinkedListItem
witch iare acceptable by the filter |
LinkedListItem |
getFirst()
|
LinkedListItem |
getLast()
|
int |
getLength()
|
boolean |
isEmpty()
|
void |
remove(LinkedListItem item)
Remove a LinkedListItem from this LinkedList |
void |
removeAll()
Remove all items |
void |
sort(int flag)
Sort a list e.g. : Person class implement LinkedListItem , a Person have name and firstname value
Set NAME = 0 and FIRSTNAME = 1 flags as public static final int variable and then, when sort is called with NAME flag, the list is sorted by name |
LinkedListItem[] |
toArray()
Returns an Object array containing all references of the elements in this LinkedList . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LinkedList()
Method Detail |
---|
public LinkedListItem getFirst()
public LinkedListItem getLast()
public int getLength()
public boolean isEmpty()
true
if this LinkedList
is emptypublic LinkedListItem find(Filter filter)
LinkedListItem
witch is acceptable by the filter
filter
-
LinkedListItem
witch is acceptable by the filter
public java.util.Vector findAll(Filter filter)
Vector
that contains the list of LinkedListItem
witch iare acceptable by the filter
filter
-
Vector
that contains the list of acceptable occurencespublic void add(LinkedListItem item)
LinkedListItem
to this LinkedList
item
- public void add(LinkedListItem item, LinkedListItem referenceItem, boolean after)
LinkedListItem
to this LinkedList
by placing it
after or before the referenceItem
according to the
after
parameter.
item
- the LinkedListItem
to addreferenceItem
- the LinkedListItem
used as referenceafter
- true
if the item is added after the referenceItem
public void remove(LinkedListItem item)
LinkedListItem
from this LinkedList
item
- public void removeAll()
public void sort(int flag)
Person
class implement LinkedListItem
, a Person
have name and firstname value
Set NAME = 0 and FIRSTNAME = 1 flags as public static final int
variable and then, when sort is called with NAME flag, the list is sorted by name
flag
- is an int value used for specifie test wich be done for sorting the listpublic LinkedListItem[] toArray()
LinkedList
.
public LinkedList.LinkedListEnumeration enumerate(Filter filter)
LinkedList.LinkedListEnumeration
filter
- the filter to apply to the LinkedList.LinkedListEnumeration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |