public class VString
extends java.util.Vector<java.lang.String>
| Modifier and Type | Field and Description |
|---|---|
static VString |
emptyVector
Deprecated.
grab your own... this is a potential leak, since it can be modified
|
| Constructor and Description |
|---|
VString()
constructor
|
VString(java.util.Enumeration<java.lang.String> a)
creates a VString from an Enumeration of Strings
|
VString(java.lang.String strIn)
convenience - constructs a VString by tokenizing a string
|
VString(java.lang.String[] a)
creates a VString from an array of Strings
|
VString(java.lang.String strIn,
java.lang.String strSep)
constructs a VString by tokenizing a string
|
VString(java.util.Vector<java.lang.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(java.lang.String[] strings)
appends all strings of an array to
this |
void |
addNonEmpty(java.lang.String text)
add a string if it is not empty
|
void |
appendUnique(java.lang.String string)
AppendUnique - append a string but ignore multiple entries
|
void |
appendUnique(VString v)
AppendUnique - append a vector but ignore multiple entries
|
boolean |
containsAny(VString others)
checks whether at least one of a given vector of strings is contained in
this |
java.lang.String |
elementAt(int index) |
java.lang.String |
get(int index) |
java.lang.String |
get(java.lang.String s)
get a string from
this |
java.lang.String |
getAllStrings()
Deprecated.
use getString(JDFConstants.BLANK,null,null)
|
java.lang.String |
getAllStrings(java.lang.String strSep)
Deprecated.
use getString(strSep,null,null)
|
VString |
getOverlapping(VString others)
vector of strings that is contained in
this |
java.util.Set<java.lang.String> |
getSet()
gets a set with all entries of the VString
note that the set retains ordering (LinkedHashSet) |
java.lang.String |
getString()
serialize to a string
|
java.lang.String |
getString(java.lang.String sep,
java.lang.String front,
java.lang.String back)
serialize to a string
|
static VString |
getVString(java.util.Collection<java.lang.String> c)
simple static factory - null if strIn is null or empty
|
static VString |
getVString(java.lang.String strIn,
java.lang.String strSep)
simple static factory - null if strIn is null or empty
|
boolean |
hasString(java.lang.String s)
Deprecated.
2005-02-14 use contains ...
|
int |
index(java.lang.String s)
index - get the index of s in the vector
|
static boolean |
isEmpty(VString v)
are we null or empty or contain only an empty JDFAttributeMap
|
java.lang.String |
remove(int index)
remove but also implementing the usual neg number syntax
|
void |
removeStrings(java.lang.String s)
Deprecated.
use removeStrings(s, Integer.MAX_VALUE);
|
void |
removeStrings(java.lang.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(java.lang.String strIn,
java.lang.String strSep)
Method setAllStrings - put a separated string into the vString
e.g. |
java.lang.String |
setvString(VString v,
java.lang.String sep,
java.lang.String front,
java.lang.String end)
Deprecated.
use getString
|
void |
sort()
sort
this lexically |
java.lang.String |
stringAt(int index)
Deprecated.
- simply use get
|
java.lang.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, forEach, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, removeRange, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, trimToSize@Deprecated public static final VString emptyVector
public VString()
public VString(java.util.Vector<java.lang.String> m)
m - public VString(java.lang.String strIn)
strIn - the string to tokenize by blankpublic VString(java.lang.String strIn,
java.lang.String strSep)
strIn - the string to tokenizestrSep - the separator characterpublic VString(java.lang.String[] a)
a - the arraypublic VString(java.util.Enumeration<java.lang.String> a)
a - the Enumerationpublic static boolean isEmpty(VString v)
v - public static VString getVString(java.lang.String strIn, java.lang.String strSep)
strIn - strSep - public static VString getVString(java.util.Collection<java.lang.String> c)
strIn - strSep - @Deprecated public java.lang.String stringAt(int index)
index - the index which may be negative to count backwardspublic java.lang.String elementAt(int index)
elementAt in class java.util.Vector<java.lang.String>index - the index which may be negative to count backwardspublic java.lang.String get(int index)
get in interface java.util.List<java.lang.String>get in class java.util.Vector<java.lang.String>index - the index which may be negative to count backwardspublic java.lang.String toString()
toString in class java.util.Vector<java.lang.String>@Deprecated public java.lang.String getAllStrings(java.lang.String strSep)
strSep - separation between the strings@Deprecated public java.lang.String getAllStrings()
public void setAllStrings(java.lang.String strIn,
java.lang.String strSep)
strIn - separated stringstrSep - string separatorpublic int index(java.lang.String s)
s - @Deprecated public boolean hasString(java.lang.String s)
this?s - string to findthispublic void appendUnique(java.lang.String string)
string - 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(java.lang.String s)
s - public void removeStrings(java.lang.String s,
int nMax)
s - the string to removenMax - remove s max. nMax times , 0 or negative = infinitepublic java.lang.String getString(java.lang.String sep,
java.lang.String front,
java.lang.String back)
sep - separator between stringsfront - string before the first entryback - string after the last entrypublic java.lang.String getString()
sep - separator between stringsfront - string before the first entryback - string after the last entry@Deprecated public java.lang.String setvString(VString v, java.lang.String sep, java.lang.String front, java.lang.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 java.lang.String get(java.lang.String s)
thiss - the String you are looking forthis does not contain spublic java.util.Set<java.lang.String> getSet()
public void sort()
this lexicallypublic void addAll(java.lang.String[] strings)
thisstrings - the array of strings to append to thispublic boolean containsAny(VString others)
thisothers - the VSTring of values to testthispublic VString getOverlapping(VString others)
thisothers - the VString of values to testthispublic boolean add(org.apache.commons.lang.enums.ValuedEnum enumType)
thisenumType - the object to appendpublic java.lang.String remove(int index)
remove in interface java.util.List<java.lang.String>remove in class java.util.Vector<java.lang.String>index - if 0, or positive count from front, else if negative from backVector.remove(int)public void addNonEmpty(java.lang.String text)
text -