|
|||||||||
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.APObject
An ArrayProtector for Objects.
Source code: APObject.java
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
APObject(Object[] a_object)
Create an APObject. |
|
APObject(Object[] a_object,
boolean b_shallowCloneAOO)
Create an APObject. |
Method Summary | |
void |
addToVWObject(VWObject ac_object)
Add the array-being-protected to the provided VWObject. |
void |
appendTSList(StringOrBuffer str_orBfr,
String s_prefix,
String s_divider,
String s_postfix,
String s_ifNull,
String s_ifEmpty,
String s_ifLmntNull)
Get a new PASString representing the toStrings() of the internally-held array of Objects. |
protected Object |
clone()
Get a full (deep) copy of this APObject as an Object. |
Object[] |
getAOOShallowClone()
Get a copy of the object-array-being-wrapped, with references to the original object elements. |
APObject |
getAPOClone()
Get a full (deep) copy of this APObject. |
int |
getLength()
How many elements exist in the array-being-protected? |
Object |
getObject(int i_dx)
Get the object at the requested array index. |
PASAOObject |
getPASAOObject()
Get a new PASString representing the toStrings() of the internally-held array of Objects. |
String |
getString(int i_dx)
|
boolean |
isNull()
As a whole, is the array-being-protected null? |
boolean |
isNull(int i_dx)
Is the object at the provided array index null? |
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 APObject(Object[] a_object)
Create an APObject.
Equal to APObject(a_object, false)
public APObject(Object[] a_object, boolean b_shallowCloneAOO)
Create an APObject.
a_object
- The array of objects to protect.b_shallowCloneAOO
- Should a_object be (shallow-ly) cloned to start off--here in this constructor? This recreates a_object as a shallow clone of itself, to prevent external code from altering it.Method Detail |
public final boolean isNull()
ArrayProtector
As a whole, is the array-being-protected null?
isNull
in class ArrayProtector
(a_object == null)
Where a_object is exactly as provided to the constructor.public final boolean isNull(int i_dx)
Is the object at the provided array index null?
isNull
in class ArrayProtector
(ao[i_dx] == null)
public final int getLength()
ArrayProtector
How many elements exist in the array-being-protected?
getLength
in class ArrayProtector
a_object.length
Where a_object is exactly as provided to the constructor.AssertException
- If isNull is true.public final Object getObject(int i_dx)
Get the object at the requested array index.
a_object[i_dx]
Where a_object is exactly as provided to the constructor.public final PASAOObject getPASAOObject()
Get a new PASString representing the toStrings() of the internally-held array of Objects.
(new PASAOObject([the internally-held array of Objects], true))
public final void appendTSList(StringOrBuffer str_orBfr, String s_prefix, String s_divider, String s_postfix, String s_ifNull, String s_ifEmpty, String s_ifLmntNull)
Get a new PASString representing the toStrings() of the internally-held array of Objects.
Equal to getPASAOObject().appendTSList(str_orBfr, s_prefix, s_divider, s_postfix, s_ifNull, s_ifEmpty, s_ifLmntNull);
public final void addToVWObject(VWObject ac_object)
Add the array-being-protected to the provided VWObject.
If isNull equals true, nothing is done. If false, then ac_object.addArray([INTERNAL ARRAY])
is called.
ac_object
- The VWObject to add to. May not be null.public final Object[] getAOOShallowClone()
Get a copy of the object-array-being-wrapped, with references to the original object elements.
(new UtilArray()).getAOOShallowClone(a_object)
Where a_object 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 String toString()
ArrayProtector
Get some information about this ArrayProtector.
toString
in class ArrayProtector
public final String getString(int i_dx)
getString
in class ArrayProtector
public final APObject getAPOClone()
Get a full (deep) copy of this APObject.
(APObject)clone()
protected Object clone() throws CloneNotSupportedException
Get a full (deep) copy of this APObject 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