|
|||||||||
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.VWChar
A VectorWrapper for chars.
Source code: VWChar.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 | |
VWChar()
Create a VWChar with default settings. |
|
VWChar(boolean b_orderDirAscDesc)
Create a VWChar. |
|
VWChar(boolean b_addInOrder,
boolean b_orderDirAscDesc)
Create a VWChar. |
|
VWChar(Vector v_ector)
Create a VWChar. |
|
VWChar(Vector v_ector,
boolean b_orderDirAscDesc)
Create a VWChar. |
|
VWChar(Vector v_ector,
boolean b_addInOrder,
boolean b_orderDirAscDesc)
Create a VWChar. |
Method Summary | |
void |
add(char c_har)
Add a char. |
void |
addAPChar(APChar ap_char)
Add an array of chars, as protected by the provided APChar. |
void |
addArray(char[] a_char)
Add an array of chars. |
protected Object |
clone()
Get a full (deep) copy of this VWChar as an Object. |
boolean |
doesExist(char c_har)
Was an char already added? |
char[] |
getAOChar()
|
char[] |
getAOChar(boolean b_sort)
Get the array of chars. |
char |
getChar(int i_dx)
Get a char from the vector, at the required array index. |
int |
getFoundIdx(char c_har)
Get the index at which the char actually exists. |
int |
getInsertAddIdx(char c_har)
Get the index at which to insert the provided char. |
String |
getString(int i_dx)
Get the element at the requested index, as a string. |
VWChar |
getVWCClone()
Get a full (deep) copy of this VWChar. |
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 VWChar()
Create a VWChar with default settings.
Equal to VectorWrapper()
public VWChar(Vector v_ector)
Create a VWChar.
Equal to VectorWrapper(v_ector)
Note: It is expected that this Vector contain only chars (contained in Character objects).
public VWChar(boolean b_orderDirAscDesc)
Create a VWChar.
Equal to VectorWrapper(b_orderDirAscDesc)
public VWChar(Vector v_ector, boolean b_orderDirAscDesc)
Create a VWChar.
Equal to VectorWrapper(v_ector, b_orderDirAscDesc)
Note: It is expected that this Vector contain only chars (contained in Character objects).
public VWChar(boolean b_addInOrder, boolean b_orderDirAscDesc)
Create a VWChar.
Equal to VectorWrapper(b_addInOrder, b_orderDirAscDesc)
public VWChar(Vector v_ector, boolean b_addInOrder, boolean b_orderDirAscDesc)
Create a VWChar.
Equal to VectorWrapper(v_ector, b_addInOrder, b_orderDisAscDesc)
Note: It is expected that this Vector contain only chars (contained in Character objects).
Method Detail |
public final void add(char c_har)
Add a char.
c_har
- The char to add.public final int getInsertAddIdx(char c_har)
Get the index at which to insert the provided char. This function is only meaningful when adding is ordered. See doAddInOrder.
c_har
- The char you're about to insert. May not be null.public final int getFoundIdx(char c_har)
Get the index at which the char actually exists.
c_har
- The char that may already exist in this VWInt. May not be null.public final boolean doesExist(char c_har)
Was an char already added?
c_har
- The char who's existence you want to test. May not be null.public final void addArray(char[] a_char)
Add an array of chars.
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.
ap_char
- The APChar, whose protected array should be add, via addArray. May not be null.public final char getChar(int i_dx)
Get a char from the vector, at the required array index.
i_dx
- The array index. Must range 0..[size() - 1]
, inclusive.public final String getString(int i_dx)
VectorWrapper
Get the element at the requested index, as a string.
getString
in class VectorWrapper
xbn.array.VectorWrapper
i_dx
- The Vector index to retrieve. 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 char[] getAOChar()
public final char[] getAOChar(boolean b_sort)
Get the array of chars. This array is composed of all those chars added since this object was created, or since the last time this function was called.
b_sort
- If true, then sort the array ascending before returning it (this is redundant when both doAddInOrder and getOrderDirAscDesc equal true). If false, then return the array as it currently exists.public final VWChar getVWCClone()
Get a full (deep) copy of this VWChar.
(VWChar)clone()
protected final Object clone() throws CloneNotSupportedException
Get a full (deep) copy of this VWChar 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