|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.util.XBNLocked | +--xbn.array.primitive.PrimitiveArray | +--xbn.array.primitive.PrimitiveArrayString | +--xbn.array.primitive.PASAOObject
A PrimitiveArrayString that wraps around an array of java.lang.Objects. This class defines the string (see PrimitiveArray.getString) to be the Object's toString. Extend this class to make the string represent something else.
Source code: PASAOObject.java.
Field Summary | |
static String |
sPASAOO
|
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
PASAOObject()
Create a PASAOObject with default values. |
|
PASAOObject(Object[] a_object)
Create a PASAOObject. |
|
PASAOObject(Object[] a_object,
boolean b_lock)
Create a PASAOObject. |
|
PASAOObject(Object[] a_object,
PARString par_string)
Create a PASAOObject. |
|
PASAOObject(Object[] a_object,
PARString par_string,
boolean b_lock)
Create a PASAOObject. |
|
PASAOObject(String s_fqExtendingClass,
Object[] a_object)
Create a PASAOObject. |
|
PASAOObject(String s_fqExtendingClass,
Object[] a_object,
boolean b_lock)
Create a PASAOObject. |
|
PASAOObject(String s_fqExtendingClass,
Object[] a_object,
PARString par_string)
Create a PASAOObject. |
|
PASAOObject(String s_fqExtendingClass,
Object[] a_object,
PARString par_string,
boolean b_lock)
Create an PASAOObject. |
Method Summary | |
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. |
Object[] |
getAOObject()
Get the array of objects for direct manipulation. |
int |
getLength()
How many strings exist in this PASAOObject? |
Object |
getObject(int i_dx)
Get the object at the requested array index. |
PASNamed |
getPASNamed()
|
PASString |
getPASString()
Get a new PASString representing the internally-held array of Objects (as Strings). |
String |
getString(int i_dx)
Get the toString of the requested element. |
boolean |
isLocked()
Is the value locked? |
boolean |
isNull()
Is the array of objects null? |
boolean |
isNull(int i_dx)
Is the object at the requested array index null? |
void |
lock()
Lock the value, forbidding further sets. |
Methods inherited from class xbn.array.primitive.PrimitiveArrayString |
areLmntsEqual, areLmntsEqual, getPARString, isValid |
Methods inherited from class xbn.array.primitive.PrimitiveArray |
areLmntsEqual, crashIfBad, crashIfBad, declareNoViolation, getFQClassName, getList, getList, getList, getList, getNewAOSOBString, getNewAOSOBStringBuffer, getNewAOString, getPAViolation, getPrimitiveArrayRule, getSOBString, getSOBStringBuffer, isValid, setPAViolation, throwAXIllegal, throwLmntsEqualAioobx, wasValidated |
Methods inherited from class xbn.util.XBNLocked |
throwLX, throwLX, throwLXIfLocked, throwLXIfLocked, throwLXIfLocked, throwLXIfUnlocked |
Methods inherited from class xbn.XBNObject |
getXMsgPrefix, sop, sopl, sopl, throwAX, throwAXIfBadStr, throwAXIfNull, throwAXSpoof |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String sPASAOO
Constructor Detail |
public PASAOObject()
Create a PASAOObject with default values.
Equal to PASAOObject(null)
public PASAOObject(Object[] a_object)
Create a PASAOObject.
Equal to PASAOObject(sPASAOO, a_object)
public PASAOObject(String s_fqExtendingClass, Object[] a_object)
Create a PASAOObject.
Equal to PASAOObject(s_fqExtendingClass, a_object, (new PARString())))
public PASAOObject(Object[] a_object, PARString par_string)
Create a PASAOObject.
Equal to PASAOObject(sPASAOO, a_object, par_string)
public PASAOObject(Object[] a_object, boolean b_lock)
Create a PASAOObject.
Equal to PASAOObject(sPASAOO, a_object, (new PARString()), b_lock)
public PASAOObject(Object[] a_object, PARString par_string, boolean b_lock)
Create a PASAOObject.
Equal to PASAOObject(sPASAOO, a_object, par_string, b_lock)
public PASAOObject(String s_fqExtendingClass, Object[] a_object, PARString par_string)
Create a PASAOObject.
Equal to PASAOObject(s_fqExtendingClass, a_object, par_string, false)
public PASAOObject(String s_fqExtendingClass, Object[] a_object, boolean b_lock)
Create a PASAOObject.
Equal to PASAOObject(s_fqExtendingClass, a_object, (new PARString()), b_lock)
public PASAOObject(String s_fqExtendingClass, Object[] a_object, PARString par_string, boolean b_lock)
Create an PASAOObject.
The first line of this constructor calls PrimitiveArrayChar(s_fqExtendingClass, par_string)
a_object
- The array of Objects that should somehow appear like an array of strings.b_lock
- Should a_object be directly accessible, via getAOObject? If true, yes. If false, no. See lock and isLocked.Method Detail |
public final int getLength()
How many strings exist in this PASAOObject?
getLength
in class PrimitiveArray
AssertException
- If isNull equals true.public final Object getObject(int i_dx)
Get the object at the requested array index.
i_dx
- The array index. Must range 0..[getLength() - 1]
, inclusiveAssertException
- If isNull equals true.public final Object[] getAOObject()
Get the array of objects for direct manipulation.
LockedException
- If isLocked equals false.public final boolean isNull()
Is the array of objects null?
isNull
in class PrimitiveArray
(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 requested array index null?
isNull
in class PrimitiveArray
i_dx
- The array index. Must range 0..[getLength() - 1]
, inclusive(a_object[i_dx] == null)
where a_object is exactly as provided to the constructor.public final PASNamed getPASNamed()
public String getString(int i_dx)
Get the toString of the requested element.
getString
in class PrimitiveArray
getObject(i_dx).toString()
public final PASString getPASString()
Get a new PASString representing the internally-held array of Objects (as Strings).
(new PASString((String[])[the internally-held array of Objects], isLocked()))
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 [UtilArray].appendTSList(str_orBfr, [the internally-held array of objects], s_prefix, s_divider, s_postfix, s_ifNull, s_ifEmpty, s_ifLmntNull)
public final void lock()
LockOneWay
Lock the value, forbidding further sets. There is no way to unlock the value, so consider this function a "one way ticket".
It is recommended to crash if the value is already locked (isLocked is true). You must crash in your class' "set" functions when isLocked is true.
lock
in interface LockOneWay
xbn.util.LockOneWay
AssertException
- If isLocked is true.public final boolean isLocked()
LockOneWay
Is the value locked?
isLocked
in interface LockOneWay
xbn.util.LockOneWay
|
|||||||||
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