Java EE 5 SDK

com.sun.appserv.management.util.misc
Class StringifiedList

java.lang.Object
  extended by com.sun.appserv.management.util.misc.StringifiedList

public class StringifiedList
extends Object

Maintain a list of Strings, ensuring that a String constructor may be used to repopulate the list and that toString() generates a String appropriate for such use. NOTE: this should be improved so that items may contain the delimiter


Field Summary
static char DEFAULT_DELIM
           
 
Constructor Summary
StringifiedList(String listString)
          Create a new list with the delimiter DEFAULT_DELIM
StringifiedList(String[] items, char delim)
          Create a new list with the specified delimiter
StringifiedList(String listString, char delim)
          Create a new list with the specified delimiter, with contents taken from the supplied String.
 
Method Summary
 void append(String item)
           
 boolean exists(String name)
           
 Iterator iterator()
           
 void prepend(String item)
           
 void remove(String item)
           
 String[] toArray()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_DELIM

public static final char DEFAULT_DELIM
See Also:
Constant Field Values
Constructor Detail

StringifiedList

public StringifiedList(String listString)
Create a new list with the delimiter DEFAULT_DELIM


StringifiedList

public StringifiedList(String[] items,
                       char delim)
Create a new list with the specified delimiter


StringifiedList

public StringifiedList(String listString,
                       char delim)
Create a new list with the specified delimiter, with contents taken from the supplied String.

Parameters:
listString - the string containing 0 or more items for the list
delim - the delimiter between items
Method Detail

toString

public String toString()
Overrides:
toString in class Object

toArray

public String[] toArray()

exists

public boolean exists(String name)

iterator

public Iterator iterator()

prepend

public void prepend(String item)

append

public void append(String item)

remove

public void remove(String item)

Java EE 5 SDK

Submit a bug or feature

Copyright 2006 Sun Microsystems, Inc. All rights reserved.