|
|||||||||
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.named.VWNamed
A VectorWrapper for Named objects. See Named.
Source code: VWNamed.java. Example code See the similar example code for VWInt.
0.8.2b
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
VWNamed()
Create a VWNamed with default settings. |
|
VWNamed(boolean b_orderDirAscDesc)
Create a VWNamed. |
|
VWNamed(boolean b_addInOrder,
boolean b_orderDirAscDesc)
Create a VWNamed. |
|
VWNamed(Vector v_ector)
Create a VWNamed. |
|
VWNamed(Vector v_ector,
boolean b_orderDirAscDesc)
Create a VWNamed. |
|
VWNamed(Vector v_ector,
boolean b_addInOrder,
boolean b_orderDirAscDesc)
Create a VWNamed. |
Method Summary | |
void |
add(Named n_amed)
Add a Named object. |
void |
addArray(Named[] a_named)
Add an array of strings. |
protected Object |
clone()
Get a full (deep) copy of this VWNamed as an Object. |
boolean |
doesExist(String s_name)
Was a Named object with the provided name already added? |
Named[] |
getAONamed()
Get the array of strings. |
int |
getFoundIdx(String s_name)
Get the index at which the string actually exists. |
int |
getInsertAddIdx(String s_name)
Get the index at which to insert the provided string. |
Named |
getNamed(int i_dx)
Get a string from the vector, at the required array index. |
String |
getString(int i_dx)
Alias for getNamed(i_dx).getName() . |
VWNamed |
getVWSClone()
Get a full (deep) copy of this VWNamed. |
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 VWNamed()
Create a VWNamed with default settings.
Equal to VectorWrapper()
public VWNamed(Vector v_ector)
Create a VWNamed.
Equal to VectorWrapper(v_ector)
Note: It is expected that this Vector contain only Named objects.
public VWNamed(boolean b_orderDirAscDesc)
Create a VWNamed.
Equal to VectorWrapper(b_orderDirAscDesc)
public VWNamed(Vector v_ector, boolean b_orderDirAscDesc)
Create a VWNamed.
Equal to VectorWrapper(v_ector, b_orderDirAscDesc)
Note: It is expected that this Vector contain only Named objects.
public VWNamed(boolean b_addInOrder, boolean b_orderDirAscDesc)
Create a VWNamed.
Equal to VectorWrapper(b_addInOrder, b_orderDirAscDesc)
public VWNamed(Vector v_ector, boolean b_addInOrder, boolean b_orderDirAscDesc)
Create a VWNamed.
Equal to VectorWrapper(v_ector, b_addInOrder, b_orderDisAscDesc)
Note: It is expected that this Vector contain only Named objects.
Method Detail |
public final void add(Named n_amed)
Add a Named object.
n_amed
- The string to add. May not be null, nor may the name be null. If not adding in order, then the name may not be less than zero characters in length. If adding in order, the name may not be less than one character in length.public final int getInsertAddIdx(String s_name)
Get the index at which to insert the provided string. This function is only meaningful when doAddInOrder() equals true. See doAddInOrder.
s_name
- The name of the Named you wish to add. May not be null.public final int getFoundIdx(String s_name)
Get the index at which the string actually exists.
n_amed
- The string that may already exist in this VWNamed. May not be null.public final boolean doesExist(String s_name)
Was a Named object with the provided name already added?
s_name
- The name who's existence (of the Named object having that name) you want to test for. May not be null.public final void addArray(Named[] a_named)
Add an array of strings.
For each element in a_named, this calls, in order: add(a_named[X])
a_named
- The Named array to add. May not be null, nor may any element be null.public final String getString(int i_dx)
Alias for getNamed(i_dx).getName()
.
getString
in class VectorWrapper
getNamed(i_dx).getName()
public final Named getNamed(int i_dx)
Get a string from the vector, at the required array index.
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 Named[] getAONamed()
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 VWNamed getVWSClone()
Get a full (deep) copy of this VWNamed.
(VWNamed)clone()
protected final Object clone() throws CloneNotSupportedException
Get a full (deep) copy of this VWNamed 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