|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.array.VectorWrapper | +--xbn.array.VWString
A VectorWrapper for java.lang.Strings. See java.lang.String.
Source code: VWString.java. Example code See the similar example code for VWInt.
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
VWString()
Create a VWString with default settings. |
|
VWString(boolean b_orderDirAscDesc)
Create a VWString. |
|
VWString(boolean b_addInOrder,
boolean b_orderDirAscDesc)
Create a VWString. |
|
VWString(Vector v_ector)
Create a VWString. |
|
VWString(Vector v_ector,
boolean b_orderDirAscDesc)
Create a VWString. |
|
VWString(Vector v_ector,
boolean b_addInOrder,
boolean b_orderDirAscDesc)
Create a VWString. |
Method Summary | |
void |
add(String s_tr)
Add a string. |
void |
addAOChar(char[] a_char)
Add an array of chars. |
void |
addAOInt(int[] a_int)
Add an array of ints. |
void |
addAPChar(APChar ap_char)
Add an array of chars, as protected by the provided APChar. |
void |
addAPInt(APInt ap_int)
Add an array of chars, as protected by the provided APInt. |
void |
addAPString(APString ap_string)
Add an array of strings, as protected by the provided APString. |
void |
addArray(String[] a_string)
Add an array of strings. |
void |
addChar(char c_har)
Add a character. |
void |
addInt(int i_nt)
Add an int. |
protected Object |
clone()
Get a full (deep) copy of this VWString as an Object. |
boolean |
doesExist(String s_tr)
Was a string already added? |
String[] |
getAOString()
Get the array of strings. |
int |
getFoundIdx(String s_tr)
Get the index at which the string actually exists. |
int |
getInsertAddIdx(String s_tr)
Get the index at which to insert the provided string. |
String |
getString(int i_dx)
Get a string from the vector, at the required array index. |
VWString |
getVWSClone()
Get a full (deep) copy of this VWString. |
boolean |
isNull(int i_dx)
Is the element at the requested index null?. |
Methods inherited from class xbn.array.VectorWrapper |
doAddInOrder, elementAt, getList, getOrderDirAscDesc, getVector, initializeVector, size |
Methods inherited from class xbn.XBNObject |
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public VWString()
Create a VWString with default settings.
Equal to VectorWrapper()
public VWString(Vector v_ector)
Create a VWString.
Equal to VectorWrapper(v_ector)
Note: It is expected that this Vector contain only strings.
public VWString(boolean b_orderDirAscDesc)
Create a VWString.
Equal to VectorWrapper(b_orderDirAscDesc)
public VWString(Vector v_ector, boolean b_orderDirAscDesc)
Create a VWString.
Equal to VectorWrapper(v_ector, b_orderDirAscDesc)
Note: It is expected that this Vector contain only strings.
public VWString(boolean b_addInOrder, boolean b_orderDirAscDesc)
Create a VWString.
Equal to VectorWrapper(b_addInOrder, b_orderDirAscDesc)
public VWString(Vector v_ector, boolean b_addInOrder, boolean b_orderDirAscDesc)
Create a VWString.
Equal to VectorWrapper(v_ector, b_addInOrder, b_orderDisAscDesc)
Note: It is expected that this Vector contain only strings.
Method Detail |
public final void add(String s_tr)
Add a string.
s_tr
- The string to add. May not be null. If not adding in order, then this may not be less than zero characters in length. If adding in order, may not be less than one character in length.public final int getInsertAddIdx(String s_tr)
Get the index at which to insert the provided string. This function is only meaningful when doAddInOrder() equals true. See doAddInOrder.
s_tr
- The string you're about to insert. May not be null.public final int getFoundIdx(String s_tr)
Get the index at which the string actually exists.
s_tr
- The string that may already exist in this VWString. May not be null.public final boolean doesExist(String s_tr)
Was a string already added?
s_tr
- The string who's existence you want to test. May not be null.public final void addChar(char c_har)
public final void addInt(int i_nt)
public final void addArray(String[] a_string)
Add an array of strings.
For each element in a_string, this calls, in order: add(a_string[X])
a_string
- The string array to add. May not be null, nor may any element be null.public final void addAPString(APString ap_string)
Add an array of strings, as protected by the provided APString.
For each element in ap_string, this calls, in order: add(ap_string.getString(X))
ap_string
- The APString, whose internally-held string array should be added. May not be null.public final void addAOChar(char[] a_char)
Add an array of chars.
For each element in a_string, this calls, in order: add(a_string[X])
a_char
- The char array to add. May not be null.public final void addAPChar(APChar ap_char)
Add an array of chars, as protected by the provided APChar.
Equal to addAOChar(ap_char.[The internally-held char array])
ap_char
- The APChar to add. May not be null.public final void addAOInt(int[] a_int)
Add an array of ints.
a_int
- The int array to add. May not be null.public final void addAPInt(APInt ap_int)
Add an array of chars, as protected by the provided APInt.
Equal to addAOInt(ap_int.[The internally-held char array])
ap_int
- The APInt to add. May not be null.public final String getString(int i_dx)
Get a string from the vector, at the required array index.
getString
in class VectorWrapper
i_dx
- The array index. Must range 0..[size() - 1]
, inclusive.public final boolean isNull(int i_dx)
VectorWrapper
Is the element at the requested index null?.
isNull
in class VectorWrapper
xbn.array.VectorWrapper
i_dx
- The Vector index to analyze. Must range 0..[size() - 1]
, inclusive.true
- If the requested Vector element is null.
public final String[] getAOString()
Get the array of strings. This array is composed of all those strings added since this object was created, or since the last time this function was called.
public final VWString getVWSClone()
Get a full (deep) copy of this VWString.
(VWString)clone()
protected final Object clone() throws CloneNotSupportedException
Get a full (deep) copy of this VWString as an Object.
clone
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1997-2003, Jeff Epstein, All Rights Reserved. See top of source code files for copyright notice.
http://sourceforge.net/projects/xbnjava