|
|||||||||
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.APChar
An ArrayProtector for chars.
Source code: APChar.java
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
APChar(char[] a_char)
Create an APChar. |
|
APChar(char[] a_char,
boolean b_cloneAOC)
Create an APChar. |
Method Summary | |
void |
addToACChar(VWChar ac_char)
Add the char-array-being-protected to the provided VWChar. |
int |
binarySearch(char c_har)
Return the array index at which the provided character exists. |
protected Object |
clone()
Get a full (deep) copy of this APChar as an Object. |
boolean |
doesExistInSrtd(char c_har)
Does the provided character exist in the sorted char-array-being-protected? |
char[] |
getAOCClone()
Get a full (deep) copy of the char-array-being-wrapped. |
APChar |
getAPCClone()
Get a full (deep) copy of this APChar. |
char |
getChar(int i_dx)
Get the char at the requested array index. |
int |
getLength()
How many elements exist in the array-being-protected? |
PACChar |
getPACChar()
Get a new PACChar 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 APChar(char[] a_char)
Create an APChar.
public APChar(char[] a_char, boolean b_cloneAOC)
Create an APChar.
Method Detail |
public final boolean isNull()
ArrayProtector
As a whole, is the array-being-protected null?
isNull
in class ArrayProtector
(a_char == null)
Where a_char 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_char.length
Where a_char is exactly as provided to the constructor.AssertException
- If isNull is true.public final char getChar(int i_dx)
Get the char at the requested array index.
a_char[i_dx]
Where a_char is exactly as provided to the constructor.public final String getString(int i_dx)
getString
in class ArrayProtector
public final boolean isNull(int i_dx)
isNull
in class ArrayProtector
public final boolean doesExistInSrtd(char c_har)
Does the provided character exist in the sorted char-array-being-protected?
(binarySearch(c_har) > -1)
public final int binarySearch(char c_har)
Return the array index at which the provided character exists.
You must ensure that the a_char constructor parameter is properly sorted. Otherwise this function provides unpredictable results
Arrays.binarySearch([CHAR-ARRAY-BEING-PROTECTED], c_har)
AssertException
- If isNull equals true.public final void addToACChar(VWChar ac_char)
Add the char-array-being-protected to the provided VWChar.
If isNull equals true, nothing is done. If false, then ac_char.addArray([INTERNAL CHAR ARRAY])
is called.
ac_char
- The VWChar to add to. May not be null.public final char[] getAOCClone()
Get a full (deep) copy of the char-array-being-wrapped.
(new UtilArray()).getAOCClone(a_char)
Where a_char 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 PACChar getPACChar()
Get a new PACChar wrapping around the char-array-being-protected.
(new PACChar(getAOCClone(), true))
public final APChar getAPCClone()
Get a full (deep) copy of this APChar.
(APChar)clone()
protected final Object clone() throws CloneNotSupportedException
Get a full (deep) copy of this APChar as an Object.
clone
in class Object
public String toString()
ArrayProtector
Get some information about this ArrayProtector.
toString
in class ArrayProtector
|
|||||||||
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