public class StringList
extends java.lang.Object
implements java.lang.Iterable<java.lang.String>
StringList
is an immutable list of String
s.Constructor and Description |
---|
StringList(java.lang.String... tokens)
Initializes the current instance.
|
StringList(java.lang.String singleToken)
Initializes the current instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
compareToIgnoreCase(StringList tokens)
Compares to tokens list and ignores the case of the tokens.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getToken(int index)
Retrieves a token from the given index.
|
int |
hashCode() |
java.util.Iterator<java.lang.String> |
iterator()
Retrieves an
Iterator over all tokens. |
int |
size()
Retrieves the number of tokens inside this list.
|
java.lang.String |
toString() |
public StringList(java.lang.String singleToken)
singleToken
- one single tokenpublic StringList(java.lang.String... tokens)
tokens
- the string parts of the new StringList
, an empty
tokens array or null is not permitted.public java.lang.String getToken(int index)
index
- public int size()
public java.util.Iterator<java.lang.String> iterator()
Iterator
over all tokens.iterator
in interface java.lang.Iterable<java.lang.String>
public boolean compareToIgnoreCase(StringList tokens)
tokens
- public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2010 - 2020 Adobe. All Rights Reserved