|
|||||||||
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.VWInt
A VectorWrapper for ints.
Source code: VWInt.java. Example code XmplVWInt.java.
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
VWInt()
Create a VWInt with default settings. |
|
VWInt(boolean b_orderDirAscDesc)
Create a VWInt. |
|
VWInt(boolean b_addInOrder,
boolean b_orderDirAscDesc)
Create a VWInt. |
|
VWInt(Vector v_ector)
Create a VWInt. |
|
VWInt(Vector v_ector,
boolean b_orderDirAscDesc)
Create a VWInt. |
|
VWInt(Vector v_ector,
boolean b_addInOrder,
boolean b_orderDirAscDesc)
Create a VWInt. |
Method Summary | |
void |
add(int i_nt)
Add an int. |
void |
addAPInt(APInt ap_int)
Add an array of ints, as protected by the provided APInt. |
void |
addArray(int[] a_int)
Add an array of ints. |
protected Object |
clone()
Get a full (deep) copy of this VWInt as an Object. |
boolean |
doesExist(int i_nt)
Was an int already added? |
int[] |
getAOInt()
|
int[] |
getAOInt(boolean b_sort)
Get the array of ints. |
int |
getFoundIdx(int i_nt)
Get the index at which the int actually exists. |
int |
getInsertAddIdx(int i_nt)
Get the index at which to insert the provided int. |
int |
getInt(int i_dx)
Get an int from the vector, at the required array index. |
String |
getString(int i_dx)
Get the element at the requested index, as a string. |
VWInt |
getVWIClone()
Get a full (deep) copy of this VWInt. |
void |
increment(int i_ndex,
int i_ncrement)
Add to an existing integer value. |
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 VWInt()
Create a VWInt with default settings.
Equal to VectorWrapper()
public VWInt(Vector v_ector)
Create a VWInt.
Equal to VectorWrapper(v_ector)
Note: It is expected that this Vector contain only ints (contained in Integer objects).
public VWInt(boolean b_orderDirAscDesc)
Create a VWInt.
Equal to VectorWrapper(b_orderDirAscDesc)
public VWInt(Vector v_ector, boolean b_orderDirAscDesc)
Create a VWInt.
Equal to VectorWrapper(v_ector, b_orderDirAscDesc)
Note: It is expected that this Vector contain only ints (contained in Integer objects).
public VWInt(boolean b_addInOrder, boolean b_orderDirAscDesc)
Create a VWInt.
Equal to VectorWrapper(b_addInOrder, b_orderDirAscDesc)
public VWInt(Vector v_ector, boolean b_addInOrder, boolean b_orderDirAscDesc)
Create a VWInt.
Equal to VectorWrapper(v_ector, b_addInOrder, b_orderDisAscDesc)
Note: It is expected that this Vector contain only ints (contained in Integer objects).
Method Detail |
public final void add(int i_nt)
Add an int.
i_nt
- The int to add.public final void increment(int i_ndex, int i_ncrement)
Add to an existing integer value.
public final int getInsertAddIdx(int i_nt)
Get the index at which to insert the provided int. This function is only meaningful when adding is ordered. See doAddInOrder.
i_nt
- The int you're about to insert. May not be null.public final int getFoundIdx(int i_nt)
Get the index at which the int actually exists.
i_nt
- The int that may already exist in this VWInt. May not be null.public final boolean doesExist(int i_nt)
Was an int already added?
i_nt
- The int who's existence you want to test. May not be null.public final void addArray(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 ints, as protected by the provided APInt.
ap_int
- The APInt, whose protected array should be add, via addArray. May not be null.public final int getInt(int i_dx)
Get an int 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 int[] getAOInt()
public final int[] getAOInt(boolean b_sort)
Get the array of ints. This array is composed of all those ints 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 VWInt getVWIClone()
Get a full (deep) copy of this VWInt.
(VWInt)clone()
protected final Object clone() throws CloneNotSupportedException
Get a full (deep) copy of this VWInt 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