public class VString extends Vector<String>
| Modifier and Type | Field and Description |
|---|---|
static VString |
emptyVector
the empty VString
|
capacityIncrement, elementCount, elementDatamodCount| Constructor and Description |
|---|
VString()
constructor
|
VString(Enumeration<String> a)
creates a VString from an Enumeration of Strings
|
VString(String strIn)
Deprecated.
use VString (String strIn, null)
|
VString(String[] a)
creates a VString from an array of Strings
|
VString(String strIn,
String strSep)
constructs a VString by tokenizing a string
|
VString(Vector<String> m)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(org.apache.commons.lang.enums.ValuedEnum enumType)
appends enumType to
thisif enumType is a ValuedEnum, the name is appended |
void |
addAll(String[] strings)
appends all strings of an array to
this |
void |
appendUnique(String v)
AppendUnique - append a string but ignore multiple entries
|
void |
appendUnique(VString v)
AppendUnique - append a vector but ignore multiple entries
|
boolean |
containsAny(VString other)
checks whether at least one of a given vector of strings is contained in
this |
String |
elementAt(int index) |
String |
get(int index) |
String |
get(String s)
get a string from
this |
String |
getAllStrings()
Deprecated.
use getString(JDFConstants.BLANK,null,null)
|
String |
getAllStrings(String strSep)
Deprecated.
use getString(strSep,null,null)
|
Set<String> |
getSet()
gets a set with all entries of the VString
note that the set retains ordering (LinkedHashSet) |
String |
getString(String sep,
String front,
String back)
Deprecated.
use StringUtil setVString default: getString(sep, JDFConstants.EMPTYSTRING, JDFConstants.EMPTYSTRING)
|
static VString |
getVString(String strIn,
String strSep)
simple static factory
|
boolean |
hasString(String s)
Deprecated.
2005-02-14 use contains ...
|
int |
index(String s)
index - get the index of s in the vector
|
String |
remove(int index)
remove but also implementing the usual neg number syntax
|
void |
removeStrings(String s)
Deprecated.
use removeStrings(s, Integer.MAX_VALUE);
|
void |
removeStrings(String s,
int nMax)
removeStrings - remove nMax occurrences of a string
|
void |
removeStrings(VString v)
Deprecated.
use removeStrings(v, Integer.MAX_VALUE);
|
void |
removeStrings(VString v,
int nMax)
removeStrings - remove all occurrences of a string
|
void |
setAllStrings(String strIn,
String strSep)
Method setAllStrings - put a separated string into the vString
e.g. |
String |
setvString(VString v,
String sep,
String front,
String end)
Deprecated.
use getString
|
void |
sort()
sort
this lexically |
String |
stringAt(int index) |
String |
toString()
toString
|
void |
unify()
unify - make VString unique, retaining initial order
|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elements, ensureCapacity, equals, firstElement, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSizepublic static final VString emptyVector
public VString()
@Deprecated public VString(String strIn)
strIn - the string to tokenize by blankpublic VString(String strIn, String strSep)
strIn - the string to tokenizestrSep - the separator characterpublic VString(String[] a)
a - the arraypublic VString(Enumeration<String> a)
a - the Enumerationpublic static VString getVString(String strIn, String strSep)
strIn - strSep - public String stringAt(int index)
index - the index which may be negative to count backwardspublic String elementAt(int index)
public String get(int index)
public String toString()
@Deprecated public String getAllStrings(String strSep)
strSep - separation between the strings@Deprecated public String getAllStrings()
public void setAllStrings(String strIn, String strSep)
strIn - separated stringstrSep - string separatorpublic int index(String s)
s - @Deprecated public boolean hasString(String s)
this?s - string to findthispublic void appendUnique(String v)
v - the string to append, if null nothing is addedpublic void appendUnique(VString v)
v - the vector to append, if null nothing is added@Deprecated public void removeStrings(VString v)
v - public void removeStrings(VString v, int nMax)
v - the vector of strings to remove from thisnMax - the max number of strings to remove@Deprecated public void removeStrings(String s)
s - public void removeStrings(String s, int nMax)
s - the string to removenMax - remove s max. nMax times , 0 or negative = infinite@Deprecated public String getString(String sep, String front, String back)
sep - separator between stringsfront - string before the first entryback - string after the last entry@Deprecated public String setvString(VString v, String sep, String front, String end)
v - vector of tokenssep - separator between tokensfront - prefix to string (before the first token)end - suffix to string (after the last token)public void unify()
public String get(String s)
thiss - the String you are looking forthis does not contain spublic Set<String> getSet()
public void sort()
this lexicallypublic void addAll(String[] strings)
thisstrings - the array of strings to append to thispublic boolean containsAny(VString other)
thisother - the VSTring of values to testthispublic boolean add(org.apache.commons.lang.enums.ValuedEnum enumType)
thisenumType - the object to appendCopyright © 2013. All Rights Reserved.