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