|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.apache.commons.collections.StringStack
StringUtils class in
the [lang] project.
This class implements a stack for String objects.
This class provides a way to collect a list of unique strings and join them with an optional separator.
| Constructor Summary | |
StringStack()
Deprecated. Creates an empty instance. |
|
| Method Summary | |
StringStack |
add(java.lang.String s)
Deprecated. Adds the String to the collection if it does not already contain it. |
StringStack |
addAll(StringStack ss)
Deprecated. Adds all Strings in the given StringStack to the collection (skipping those it already contains) |
void |
clear()
Deprecated. Clears the stack. |
boolean |
contains(java.lang.String s)
Deprecated. Returns whether this stack contain the specified text. |
boolean |
empty()
Deprecated. Whether the stack is empty. |
boolean |
equals(java.lang.Object ssbuf)
Deprecated. Compares two StringStacks. |
java.lang.String |
get(int i)
Deprecated. Get a string off the stack at a certain position. |
int |
size()
Deprecated. Returns the size of the stack. |
java.lang.String |
toString()
Deprecated. Converts the stack to a single String with no
separator. |
java.lang.String |
toString(java.lang.String separator)
Deprecated. Converts the stack to a single String. |
java.lang.String[] |
toStringArray()
Deprecated. Turns this stack into an array. |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public StringStack()
| Method Detail |
public StringStack add(java.lang.String s)
s - The String object to add to this stack
(if it is not null and doesn't already exist in
the stack).
public StringStack addAll(StringStack ss)
ss - The stack of String objects to add to
this stack (if it is not null and doesn't already
exist in the stack).
public void clear()
public boolean contains(java.lang.String s)
s - The text to search for.
public final boolean empty()
public java.lang.String get(int i)
i - The position.
public final int size()
public java.lang.String toString()
String with no
separator.
toString in class java.lang.Objectpublic java.lang.String toString(java.lang.String separator)
String.
separator - The text to use as glue between elements in
the stack.
separator--as a single block of text.public boolean equals(java.lang.Object ssbuf)
toString() method returns such.
equals in class java.lang.Objectpublic java.lang.String[] toStringArray()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||