|
|||||||||
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.AOSLCreator
Convenience class for creating an AOSLookup. See AOSLookup.
Source code: AOSLCreator.java. Example code See the source code for UtilArray.getAOSLFromPA.
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
AOSLCreator()
Create an AOSLCreator with default values. |
|
AOSLCreator(boolean b_dupStrsOk)
Create an AOSLCreator. |
|
AOSLCreator(boolean b_dupStrsOk,
boolean b_listStrsOnError)
Create an AOSLCreator. |
|
AOSLCreator(boolean b_dupStrsOk,
int i_unqStrCount)
Create an AOSLCreator. |
|
AOSLCreator(boolean b_dupStrsOk,
int i_unqStrCount,
boolean b_listStrsOnError)
Create an AOSLCreator. |
|
AOSLCreator(int i_unqStrCount)
Create an AOSLCreator. |
|
AOSLCreator(int i_unqStrCount,
boolean b_listStrsOnError)
Create an AOSLCreator. |
Method Summary | |
void |
addString(String s_tr)
Add a new string to the AOSLookup. |
boolean |
areDupStringsOk()
Are duplicate strings okay? |
boolean |
doListStrsOnError()
In the case of an error, should the list of strings be presented in the error message? |
AOSLookup |
getAOSLookup()
Get the AOSLookup. |
int |
getCountAbs()
How many total strings have been added?. |
int |
getCountUnq()
How many unique strings have been added?. |
int |
getUnqStrCount()
Is it known how many unique strings will be provided? |
boolean |
isLocked()
Is the value locked? |
void |
lock()
Lock the value, forbidding further sets. |
boolean |
wasLastStringUnique()
Was the string-just-added unique? |
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 |
Constructor Detail |
public AOSLCreator()
Create an AOSLCreator with default values.
Equal to AOSLCreator(true)
public AOSLCreator(boolean b_dupStrsOk)
Create an AOSLCreator.
Equal to AOSLCreator(b_dupStrsOk, -1)
public AOSLCreator(int i_unqStrCount)
Create an AOSLCreator.
Equal to AOSLCreator(true, -1)
public AOSLCreator(boolean b_dupStrsOk, int i_unqStrCount)
Create an AOSLCreator.
Equal to AOSLCreator(b_dupStrsOk, i_unqStrCount, true)
public AOSLCreator(boolean b_dupStrsOk, boolean b_listStrsOnError)
Create an AOSLCreator.
Equal to AOSLCreator(b_dupStrsOk, -1, b_listStrsOnError)
public AOSLCreator(int i_unqStrCount, boolean b_listStrsOnError)
Create an AOSLCreator.
Equal to AOSLCreator(true, i_unqStrCount, b_listStrsOnError)
public AOSLCreator(boolean b_dupStrsOk, int i_unqStrCount, boolean b_listStrsOnError)
Create an AOSLCreator.
b_dupStrsOk
- Are duplicate strings acceptable? If true, then yes. If false, no. See areDupStringsOk and addString.i_unqStrCount
- How many unique strings will exist in the AOSLookup (will be added via addString)? If -1, then the number of unique strings is not known. Otherwise, may not be less than one. See getUnqStrCount and addString.b_listStrsOnError
- Should the list of strings be printed in any error messages thrown? If true, then yes. If false, no. See doListStrsOnError.Method Detail |
public final boolean areDupStringsOk()
Are duplicate strings okay?
public final int getUnqStrCount()
Is it known how many unique strings will be provided?
public final boolean doListStrsOnError()
In the case of an error, should the list of strings be presented in the error message?
This setting, when getAOSLookup is called, is provided directly to the AOSLookup constructor.
public final void addString(String s_tr)
Add a new string to the AOSLookup.
It is expected strings are added in the same order in which they originally existed. The first string exists at absolute array index zero, the second at array index one, and so on.
s_tr
- The stringLockedException
- If isLocked equals true. This means all strings have been added.AssertException
- If...public final boolean wasLastStringUnique()
Was the string-just-added unique?
AssertException
- If no strings have been added (getCountUnq equals zero).public final int getCountUnq()
How many unique strings have been added?. See addString.
public final int getCountAbs()
How many total strings have been added?. See addString.
public final AOSLookup getAOSLookup()
Get the AOSLookup.
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