|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--xbn.XBNObject | +--xbn.config.UtilConfig
Convenience functions for reading in configuration variables via xbn.config classes.
Source code: UtilConfig.java
Fields inherited from class xbn.XBNObject |
bFALSE_IN_PRODUCTION, bTRUE_IN_PRODUCTION, sCNSTR, sES, sLINE_SEP |
Constructor Summary | |
UtilConfig()
Create a UtilConfig. |
Method Summary | |
sb_sb_c[] |
getAOsb_sb_c(VWObject acosbsbc_cfgVars)
Get an array of sb_sb_c-s from the array of objects existing in an VWObject/sb_sb_c array. |
sb_sb_c[] |
getAOsb_sb_c(VWObject acosbsbc_cfgVars,
boolean b_crashIfNullElement)
Get an array of sb_sb_c-s from the array of objects existing in an VWObject/sb_sb_c array. |
char |
getDelimiter(sb_sb_c sbsbc_cfgVar)
Get the variable delimiter from the configuration variable. |
char |
getDelimiter(VWObject acosbsbc_cfgVars,
int i_idx)
Get the variable delimiter of the desired configuration variable. |
int |
getFoundIdx(VWObject acosbsbc_cfgVars,
String s_rqdName)
At what index in the provided VWObject/sb_sb_c array, is the requested name located? |
int |
getFoundIdx(VWObject acosbsbc_cfgVars,
String s_rqdName,
boolean b_crashIfNotFound)
At what index in the provided VWObject/sb_sb_c array, is the requested name located?. |
StringBuffer |
getNameSB(sb_sb_c sbsbc_cfgVar)
Get the name of the configuration variable as a StringBuffer. |
StringBuffer |
getNameSB(VWObject acosbsbc_cfgVars,
int i_idx)
Get the name of the desired configuration variable, as a StringBuffer. |
String |
getNameString(sb_sb_c sbsbc_cfgVar)
Get the name of the configuration variable as a String. |
String |
getNameString(VWObject acosbsbc_cfgVars,
int i_idx)
Get the name of the desired configuration variable, as a String. |
sb_sb_c |
getsb_sb_c(VWObject acosbsbc_cfgVars,
int i_idx)
Translates the desired VWObject element to an sb_sb_c. |
sb_sb_c |
getsb_sb_cFromObj(Object o_bject)
Convenience function for translating an Object to an sb_sb_c. |
boolean |
getValueBoolean(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a boolean. |
boolean |
getValueBoolean(VWObject acosbsbc_cfgVars,
int i_idx)
Get the value of the desired configuration variable, as a boolean. |
boolean |
getValueBoolean(VWObject acosbsbc_cfgVars,
int i_idx,
String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a boolean. |
boolean |
getValueBoolean(VWObject acosbsbc_cfgVars,
int i_idx,
String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a boolean. |
char |
getValueChar(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a char. |
char |
getValueChar(VWObject acosbsbc_cfgVars,
int i_idx)
Get the value of the desired configuration variable, as a char. |
char |
getValueChar(VWObject acosbsbc_cfgVars,
int i_idx,
String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a char. |
char |
getValueChar(VWObject acosbsbc_cfgVars,
int i_idx,
String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a char. |
double |
getValueDouble(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a double. |
double |
getValueDouble(VWObject acosbsbc_cfgVars,
int i_idx)
Get the value of the desired configuration variable, as a double. |
double |
getValueDouble(VWObject acosbsbc_cfgVars,
int i_idx,
String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a double. |
double |
getValueDouble(VWObject acosbsbc_cfgVars,
int i_idx,
String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a double. |
int |
getValueInt(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as an int. |
int |
getValueInt(VWObject acosbsbc_cfgVars,
int i_idx)
Get the value of the desired configuration variable, as an int. |
int |
getValueInt(VWObject acosbsbc_cfgVars,
int i_idx,
String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as an int. |
int |
getValueInt(VWObject acosbsbc_cfgVars,
int i_idx,
String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as an int. |
StringBuffer |
getValueSB(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a StringBuffer. |
StringBuffer |
getValueSB(VWObject acosbsbc_cfgVars,
int i_idx)
Get the value of the desired configuration variable, as a StringBuffer. |
StringBuffer |
getValueSB(VWObject acosbsbc_cfgVars,
int i_idx,
String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a String. |
StringBuffer |
getValueSB(VWObject acosbsbc_cfgVars,
int i_idx,
String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a String. |
String |
getValueString(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a string. |
String |
getValueString(VWObject acosbsbc_cfgVars,
int i_idx)
Get the value of the desired configuration variable, as a string. |
String |
getValueString(VWObject acosbsbc_cfgVars,
int i_idx,
String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a double. |
String |
getValueString(VWObject acosbsbc_cfgVars,
int i_idx,
String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a string. |
boolean |
isAtIdx(VWObject acosbsbc_cfgVars,
int i_idx,
String[] as_rqdNames)
Is the string at element X in the array of required names, equal to the name of the variable at that same element, X, within the VWObject/sb_sb_c array? |
boolean |
isAtIdx(VWObject acosbsbc_cfgVars,
int i_idx,
String[] as_rqdNames,
boolean b_crashIfNotFoundAtIdx)
Is the string at element X in the array of required names, equal to the name of the variable at that same element, X, within the VWObject/sb_sb_c array? |
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 UtilConfig()
Create a UtilConfig. This constructor does nothing.
Method Detail |
public final sb_sb_c getsb_sb_cFromObj(Object o_bject)
Convenience function for translating an Object to an sb_sb_c.
UtilPHFromObj.getsb_sb_c(o_bject)
AssertException
- If UtilPHFromObj.getsb_sb_c
throws a NullPointerException or ClassCastException for any reason.public final sb_sb_c getsb_sb_c(VWObject acosbsbc_cfgVars, int i_idx)
Translates the desired VWObject element to an sb_sb_c.
acosbsbc_cfgVars
- The VWObject containing the configuration variables, in the form of sb_sb_c objects. May not be null, or less than [i_idx + 1]
elements in length.i_idx
- The index representing the desired element in acosbsbc_cfgVars. May not be less than zero, or greater than [acosbsbc_cfgVars.size() - 1]
.getsb_sb_cFromObj(acosbsbc_cfgVars.getObject(i_idx))
public final sb_sb_c[] getAOsb_sb_c(VWObject acosbsbc_cfgVars)
Get an array of sb_sb_c-s from the array of objects existing in an VWObject/sb_sb_c array.
getAOsb_sb_c(acosbsbc_cfgVars, true)
public final sb_sb_c[] getAOsb_sb_c(VWObject acosbsbc_cfgVars, boolean b_crashIfNullElement)
Get an array of sb_sb_c-s from the array of objects existing in an VWObject/sb_sb_c array.
acosbsbc_cfgVars
- The VWObject containing the array configuration variables. May not be null.b_crashIfNullElement
- If true, then if any elements in acosbsbc_cfgVars are null, an AssertException is thrown with a descriptive error message. If false, then null elements in acosbsbc_cfgVars are translated to null elements in the returned array (and at the same position).public final int getFoundIdx(VWObject acosbsbc_cfgVars, String s_rqdName)
At what index in the provided VWObject/sb_sb_c array, is the requested name located?
acosbsbc_cfgVars
- The VWObject containing the array configuration variables. May not be null.public final int getFoundIdx(VWObject acosbsbc_cfgVars, String s_rqdName, boolean b_crashIfNotFound)
At what index in the provided VWObject/sb_sb_c array, is the requested name located?. See getNameSB.
acosbsbc_cfgVars
- The VWObject containing the array configuration variables. May not be null.s_rqdName
- The name expected to exist in one of the acosbsbc_cfgVars elements. May not be null.b_crashIfNotFoundAtIdx
- If true, then instead of returning false, throw a descriptive AssertException instead. If false, then this function will return -1.public final boolean isAtIdx(VWObject acosbsbc_cfgVars, int i_idx, String[] as_rqdNames)
Is the string at element X in the array of required names, equal to the name of the variable at that same element, X, within the VWObject/sb_sb_c array?
isAtIdx(acosbsbc_cfgVars, i_idx, as_rqdNames, false)
public final boolean isAtIdx(VWObject acosbsbc_cfgVars, int i_idx, String[] as_rqdNames, boolean b_crashIfNotFoundAtIdx)
Is the string at element X in the array of required names, equal to the name of the variable at that same element, X, within the VWObject/sb_sb_c array?
acosbsbc_cfgVars
- The VWObject containing the array configuration variables, in the form of sb_sb_c objects. May not be null or less than [i_idx + 1]
elements in length.i_idx
- The index representing the desired element in both acosbsbc_cfgVars and as_rqdNames. May not be less than zero, or greater than the lesser of [acosbsbc_cfgVars.size() - 1]
and [as_rqdNames.length - 1]
.as_rqdNames
- The array of required names. May not be null or less than [i_idx + 1]
elements in length.b_crashIfNotFoundAtIdx
- If true, then instead of returning false, throw a descriptive AssertException instead. If this parameter equals false, then this function will return false.public final StringBuffer getNameSB(sb_sb_c sbsbc_cfgVar)
Get the name of the configuration variable as a StringBuffer.
sbsbc_cfgVar.sb1
public final String getNameString(sb_sb_c sbsbc_cfgVar)
Get the name of the configuration variable as a String.
getNameSB(sbsbc_cfgVar).toString()
public final StringBuffer getNameSB(VWObject acosbsbc_cfgVars, int i_idx)
Get the name of the desired configuration variable, as a StringBuffer.
getNameSB(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final char getDelimiter(sb_sb_c sbsbc_cfgVar)
Get the variable delimiter from the configuration variable.
sbsbc_cfgVar.c
public final String getNameString(VWObject acosbsbc_cfgVars, int i_idx)
Get the name of the desired configuration variable, as a String.
getNameString(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final char getDelimiter(VWObject acosbsbc_cfgVars, int i_idx)
Get the variable delimiter of the desired configuration variable.
getDelimiter(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final boolean getValueBoolean(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a boolean.
sbsbc_cfgVar
- The configuration variable. May not be null, and the string value must be equal to either 'true' or 'false'.public final char getValueChar(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a char.
sbsbc_cfgVar
- The configuration variable. May not be null, and the string value must be exactly on character in length.public final int getValueInt(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as an int.
sbsbc_cfgVar
- The configuration variable. May not be null, and the string value must represent a valid int.(new Integer(getValueString(sbsbc_cfgVar))).intValue()
public final double getValueDouble(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a double.
sbsbc_cfgVar
- The configuration variable. May not be null, and the string value must represent a valid double.(new Double(getValueString(sbsbc_cfgVar))).doubleValue()
public final String getValueString(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a string.
sbsbc_cfgVar
- The configuration variable. May not be null.getValueString(sbsbc_cfgVar)
public final StringBuffer getValueSB(sb_sb_c sbsbc_cfgVar)
Get the value of the configuration variable, as a StringBuffer.
sbsbc_cfgVar
- The configuration variable. May not be null.sbsbc_cfgVar.sb2
public final boolean getValueBoolean(VWObject acosbsbc_cfgVars, int i_idx)
Get the value of the desired configuration variable, as a boolean.
getValueBoolean(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final char getValueChar(VWObject acosbsbc_cfgVars, int i_idx)
Get the value of the desired configuration variable, as a char.
getValueChar(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final int getValueInt(VWObject acosbsbc_cfgVars, int i_idx)
Get the value of the desired configuration variable, as an int.
getValueInt(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final double getValueDouble(VWObject acosbsbc_cfgVars, int i_idx)
Get the value of the desired configuration variable, as a double.
getValueDouble(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final String getValueString(VWObject acosbsbc_cfgVars, int i_idx)
Get the value of the desired configuration variable, as a string.
getValueString(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final StringBuffer getValueSB(VWObject acosbsbc_cfgVars, int i_idx)
Get the value of the desired configuration variable, as a StringBuffer.
getValueSB(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final boolean getValueBoolean(VWObject acosbsbc_cfgVars, int i_idx, String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a boolean.
See getValueSB for parameter documentation.
getValueBoolean(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final char getValueChar(VWObject acosbsbc_cfgVars, int i_idx, String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a char.
See getValueSB for parameter and documentation.
getValueChar(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final int getValueInt(VWObject acosbsbc_cfgVars, int i_idx, String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as an int.
See getValueSB for parameter and documentation.
getValueInt(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final double getValueDouble(VWObject acosbsbc_cfgVars, int i_idx, String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a double.
See getValueSB for parameter and documentation.
getValueDouble(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final String getValueString(VWObject acosbsbc_cfgVars, int i_idx, String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a double.
See getValueSB for parameter and documentation.
getValueString(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final StringBuffer getValueSB(VWObject acosbsbc_cfgVars, int i_idx, String s_rqdName)
Get the value of the desired configuration variable (which must have a particular name) as a String.
acosbsbc_cfgVars
- The VWObject containing the array configuration variables, in the form of sb_sb_c objects. May not be null or less than [i_idx + 1]
elements in length.i_idx
- The index representing the desired element in acosbsbc_cfgVars. May not be less than zero, or greater than [acosbsbc_cfgVars.size() - 1]
.s_rqdName
- The name expected to equal getsb_sb_c(acosbsbc_cfgVars, i_idx)
. May not be null and must equal the name of the i_idx-th element in acosbsbc_cfgVars.getValueBoolean(getsb_sb_c(acosbsbc_cfgVars, i_idx))
public final boolean getValueBoolean(VWObject acosbsbc_cfgVars, int i_idx, String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a boolean.
See getValueSB for parameter documentation.
getValueBoolean(getsb_sb_c(acosbsbc_cfgVars, i_idx, as_rqdNames))
public final char getValueChar(VWObject acosbsbc_cfgVars, int i_idx, String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a char.
See getValueSB for parameter documentation.
getValueChar(getsb_sb_c(acosbsbc_cfgVars, i_idx, as_rqdNames))
public final int getValueInt(VWObject acosbsbc_cfgVars, int i_idx, String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as an int.
See getValueSB for parameter documentation.
getValueInt(getsb_sb_c(acosbsbc_cfgVars, i_idx, as_rqdNames))
public final double getValueDouble(VWObject acosbsbc_cfgVars, int i_idx, String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a double.
See getValueSB for parameter documentation.
getValueDouble(getsb_sb_c(acosbsbc_cfgVars, i_idx, as_rqdNames))
public final String getValueString(VWObject acosbsbc_cfgVars, int i_idx, String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a string.
See getValueSB for parameter documentation.
getValueString(getsb_sb_c(acosbsbc_cfgVars, i_idx, as_rqdNames))
public final StringBuffer getValueSB(VWObject acosbsbc_cfgVars, int i_idx, String[] as_rqdNames)
Get the value of the desired configuration variable (which must have a particular name) as a String.
acosbsbc_cfgVars
- The VWObject containing the array configuration variables, in the form of sb_sb_c objects. May not be null or less than [i_idx + 1]
elements in length.i_idx
- The index representing the desired element in both acosbsbc_cfgVars and as_rqdNames. May not be less than zero, or greater than the lesser of [acosbsbc_cfgVars.size() - 1]
and [as_rqdNames.length - 1]
.as_rqdNames
- The array of required names. May not be null or less than [i_idx + 1]
elements in length, and the i_idx-th element must equal the name of the i_idx-th element in acosbsbc_cfgVars.getValueSB(getsb_sb_c(acosbsbc_cfgVars, i_idx, as_rqdNames))
|
|||||||||
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