Top Description Fields Constructors Methods
com.ctc.wstx.util

public final Class StringVector

extends Object
Class Inheritance

Data container similar java.util.List (from storage perspective), but that can be used in multiple ways. For some uses it acts more like type-safe String list/vector; for others as order associative list of String-to-String mappings.

Field Summary

Modifier and TypeField and Description
private int
private String[]

Constructor Summary

AccessConstructor and Description
public
StringVector(int initialCount)

Method Summary

Modifier and TypeMethod and Description
public void
public void
addStrings(String str1, String str2)

public String[]
public void
clear(boolean removeRefs)

public boolean
public String
public String
findLastFromMap(String key)

Specialized access method; treats vector as a Map, with 2 Strings per entry; first one being key, second value.

public int
public int
public String
public String[]
public String
public String
getString(int index)

public boolean
public String
public void
removeLast(int count)

public void
setString(int index, String str)

public int
size()

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

mSizeback to summary
private int mSize
mStringsback to summary
private String[] mStrings

Constructor Detail

StringVectorback to summary
public StringVector(int initialCount)

Method Detail

addStringback to summary
public void addString(String str)
addStringsback to summary
public void addStrings(String str1, String str2)
asArrayback to summary
public String[] asArray()
clearback to summary
public void clear(boolean removeRefs)
containsInternedback to summary
public boolean containsInterned(String value)
findLastByValueNonInternedback to summary
public String findLastByValueNonInterned(String value)
findLastFromMapback to summary
public String findLastFromMap(String key)

Specialized access method; treats vector as a Map, with 2 Strings per entry; first one being key, second value. Further, keys are assumed to be canonicalized with passed in key (ie. either intern()ed, or resolved from symbol table). Starting from the end (assuming even number of entries), tries to find an entry with matching key, and if so, returns value.

findLastIndexByValueNonInternedback to summary
public int findLastIndexByValueNonInterned(String value)
findLastIndexNonInternedback to summary
public int findLastIndexNonInterned(String key)
findLastNonInternedback to summary
public String findLastNonInterned(String key)
getInternalArrayback to summary
public String[] getInternalArray()
getLastStringback to summary
public String getLastString()
getStringback to summary
public String getString(int index)
isEmptyback to summary
public boolean isEmpty()
removeLastback to summary
public String removeLast()
removeLastback to summary
public void removeLast(int count)
setStringback to summary
public void setString(int index, String str)
sizeback to summary
public int size()
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override