|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector<String>
org.cip4.jdflib.core.VString
public class VString
| Field Summary | |
|---|---|
static VString |
emptyVector
the empty VString |
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
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 |
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.util.Vector |
|---|
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elements, ensureCapacity, equals, firstElement, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Field Detail |
|---|
public static final VString emptyVector
| Constructor Detail |
|---|
public VString()
public VString(Vector<String> m)
m - @Deprecated public VString(String strIn)
strIn - the string to tokenize by blank
public 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 Enumeration| Method Detail |
|---|
public static VString getVString(String strIn,
String strSep)
strIn - strSep -
public String stringAt(int index)
index - the index which may be negative to count backwards
public String elementAt(int index)
elementAt in class Vector<String>index - the index which may be negative to count backwards
public String get(int index)
get in interface List<String>get in class Vector<String>index - the index which may be negative to count backwards
public String toString()
toString in class Vector<String>@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 find
thispublic 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)
this
s - the String you are looking for
this does not contain spublic Set<String> getSet()
public void sort()
this lexically
public void addAll(String[] strings)
this
strings - the array of strings to append to thispublic boolean containsAny(VString other)
this
other - the VSTring of values to test
thispublic boolean add(org.apache.commons.lang.enums.ValuedEnum enumType)
this
enumType - the object to append
public String remove(int index)
remove in interface List<String>remove in class Vector<String>index - if 0, or positive count from front, else if negative from backVector.remove(int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||