|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.matthiasmann.twl.utils.StringList
public final class StringList
An immutable single linked list of strings.
| Constructor Summary | |
|---|---|
StringList(java.lang.String value)
Constructs a string list with a single entry. |
|
StringList(java.lang.String value,
StringList next)
Constructs a new head of a string list. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
StringList |
getNext()
Returns the next element in the string list, or null if this is the last |
java.lang.String |
getValue()
Returns the string value of this element, never null |
int |
hashCode()
|
java.util.Iterator<java.lang.String> |
iterator()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StringList(java.lang.String value)
new StringList(value, null);
value - the string value
java.lang.NullPointerException - if value is null
public StringList(java.lang.String value,
StringList next)
value - the string valuenext - the rest/tail of the string list, can be null
java.lang.NullPointerException - if value is null| Method Detail |
|---|
public StringList getNext()
public java.lang.String getValue()
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Objectpublic java.util.Iterator<java.lang.String> iterator()
iterator in interface java.lang.Iterable<java.lang.String>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||