|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.array.ArrayProtector | +--xbn.array.APInt
An ArrayProtector for chars.
Source code: APInt.java
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
APInt(int[] a_int)
Create an APInt. |
|
APInt(int[] a_int,
boolean b_shallowCloneAOS)
Create an APInt. |
Method Summary | |
void |
addToACInt(VWInt ac_int)
Add the int-array-being-protected to the provided VWInt. |
int |
binarySearch(int i_nt)
Return the array index at which the provided int exists. |
protected Object |
clone()
Get a full (deep) copy of this APInt as an Object. |
boolean |
doesExistInSrtd(int i_nt)
Does the provided int exist in the sorted int-array-being-protected? |
int[] |
getAOIClone()
Get a full (deep) copy of the int-array-being-wrapped. |
APInt |
getAPIClone()
Get a full (deep) copy of this APInt. |
int |
getInt(int i_dx)
Get the int at the requested array index. |
int |
getLength()
How many elements exist in the array-being-protected? |
PAIInt |
getPAIInt()
Get a new PAIInt wrapping around the char-array-being-protected. |
String |
getString(int i_dx)
|
boolean |
isNull()
As a whole, is the array-being-protected null? |
boolean |
isNull(int i_dx)
|
String |
toString()
Get some information about this ArrayProtector. |
Methods inherited from class xbn.array.ArrayProtector |
getList, getList, getList, getList, getPASArrayProtector |
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, wait, wait, wait |
Constructor Detail |
public APInt(int[] a_int)
Create an APInt.
public APInt(int[] a_int, boolean b_shallowCloneAOS)
Create an APInt.
Method Detail |
public final boolean isNull()
ArrayProtector
As a whole, is the array-being-protected null?
isNull
in class ArrayProtector
(a_int == null)
Where a_int is exactly as provided to the constructor.public final int getLength()
ArrayProtector
How many elements exist in the array-being-protected?
getLength
in class ArrayProtector
a_int.length
Where a_int is exactly as provided to the constructor.AssertException
- If isNull is true.public final int getInt(int i_dx)
Get the int at the requested array index.
a_int[i_dx]
Where a_int is exactly as provided to the constructor.public final String getString(int i_dx)
getString
in class ArrayProtector
public final boolean doesExistInSrtd(int i_nt)
Does the provided int exist in the sorted int-array-being-protected?
(binarySearch(i_nt) > -1)
public final int binarySearch(int i_nt)
Return the array index at which the provided int exists.
You must ensure that the a_char constructor parameter is properly sorted. Otherwise this function provides unpredictable results
Arrays.binarySearch([INT-ARRAY-BEING-PROTECTED], i_nt)
AssertException
- If isNull equals true.public final boolean isNull(int i_dx)
isNull
in class ArrayProtector
public final void addToACInt(VWInt ac_int)
Add the int-array-being-protected to the provided VWInt.
If isNull equals true, nothing is done. If false, then ac_int.addArray([INTERNAL INT ARRAY])
is called.
ac_int
- The VWInt to add to. May not be null.public final int[] getAOIClone()
Get a full (deep) copy of the int-array-being-wrapped.
(new UtilArray()).getAOIClone(a_int)
Where a_int is exactly as provided to the constructor. Note that this function only creates the clone once. Once created, the copy is then internally stored, and returned for all subsequent calls.public final PAIInt getPAIInt()
Get a new PAIInt wrapping around the char-array-being-protected.
(new PAIInt(getAOIClone(), true))
public String toString()
ArrayProtector
Get some information about this ArrayProtector.
toString
in class ArrayProtector
public final APInt getAPIClone()
Get a full (deep) copy of this APInt.
(APInt)clone()
protected final Object clone() throws CloneNotSupportedException
Get a full (deep) copy of this APInt as an Object.
clone
in class Object
(new APInt(a_int))
Where a_int is exactly as provided to the constructor.
|
|||||||||
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