|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.Dictionary
|
+--sunlabs.brazil.sunlabs.ListTemplate.MyList
Implement a list of strings. This uses a Vector for its internal implementation, and is a Dictionary to allow convenient access to portions of the list. By implementing Saveable, lists can participate in persistence.
| Field Summary | |
int |
chunk
|
int |
chunksize
|
int |
overlap
|
| Constructor Summary | |
ListTemplate.MyList()
|
|
ListTemplate.MyList(String name)
Create a named list object. |
|
| Method Summary | |
void |
append(String s,
String delim)
Append a list to the end of the named list |
int |
chunks()
|
void |
clear()
Clear a list. |
void |
delete(int i)
Remove an element by index. |
Enumeration |
elements()
Return the actual list items. |
Object |
get(Object k)
|
void |
insert(String s,
String delim,
int n)
Insert a list before position n. |
boolean |
isEmpty()
The current object state is the "default"; "save" does not need to write out any state. |
Enumeration |
keys()
Return an enumeration of the "special" keys for this list. |
void |
load(InputStream in)
load a properties representation of the object, then create the object from it. |
void |
max(int n)
Set the max list size. |
Object |
put(Object key,
Object value)
This is never used; It's required by the interface |
Object |
remove(Object o)
We should never call this; it's required by the interface. |
void |
remove(String s,
String delim)
Remove items from a list, by name. |
void |
save(OutputStream out,
String header)
Create an ascii representation of this object in a Java Properties format. |
void |
setDelim(String delim)
Set the delimiter for returning ranges. |
int |
size()
|
void |
sort()
|
String |
toString()
|
void |
unique()
Remove all non unique elements of the list. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public int chunk
public int chunksize
public int overlap
| Constructor Detail |
public ListTemplate.MyList(String name)
public ListTemplate.MyList()
| Method Detail |
public int size()
size in class Dictionarypublic boolean isEmpty()
PropertiesCacheManager.Saveable
isEmpty in interface PropertiesCacheManager.SaveableisEmpty in class Dictionarypublic void sort()
public void insert(String s,
String delim,
int n)
s - The list to insertdelim - The list delimiter (null for a single item(n - The position to insert before
public void append(String s,
String delim)
public void remove(String s,
String delim)
public Object remove(Object o)
remove in class Dictionarypublic void delete(int i)
public void clear()
public void max(int n)
public void unique()
public void setDelim(String delim)
public Enumeration keys()
keys in class Dictionarypublic Enumeration elements()
elements in class Dictionarypublic Object get(Object k)
get in class Dictionary
public Object put(Object key,
Object value)
put in class Dictionarypublic String toString()
toString in class Objectpublic int chunks()
public void save(OutputStream out,
String header)
throws IOException
PropertiesCacheManager.Saveable
save in interface PropertiesCacheManager.SaveableIOException
public void load(InputStream in)
throws IOException
load in interface PropertiesCacheManager.SaveableIOException
|
Version 2.1, Generated 12/30/04 Copyright (c) 2001-2004, Sun Microsystems. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||