|
Project Wonder 5.0.0.8654 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecter.extensions.foundation.ERXValueUtilities
public class ERXValueUtilities
ERXValueUtilities has usefull conversion methods for
reading and transforming boolean,
int and floatvalues.
Unless otherwise stated, when an empty string
(or one containing only whitespace) is given, then
the string is assumed to be null. This is because
D2W is not able to give back null values anymore.
| Constructor Summary | |
|---|---|
ERXValueUtilities()
|
|
| Method Summary | |
|---|---|
static NSArray |
arrayValue(Object obj)
Basic utility method for reading NSArray values which works also with Strings. |
static NSArray |
arrayValueWithDefault(Object obj,
NSArray def)
Basic utility method for reading NSArray values
which also works with serialzed NSArrays and comma seperated items. |
static BigDecimal |
bigDecimalValue(Object obj)
Basic utility method for reading BigDecimal values which works also with Strings. |
static BigDecimal |
bigDecimalValueWithDefault(Object obj,
BigDecimal def)
Basic utility method for reading BigDecimal values. |
static boolean |
booleanValue(Object obj)
Basic utility method for determining if an object represents either a true or false value. |
static boolean |
booleanValueForBindingOnComponentWithDefault(String binding,
WOComponent component,
boolean def)
Deprecated. use ERXComponentUtilities.booleanValueForBinding(component, binding, def) |
static boolean |
booleanValueWithDefault(Object obj,
boolean def)
Basic utility method for determining if an object represents either a true or false value. |
static NSDictionary |
dictionaryValue(Object obj)
Basic utility method for reading NSDictionary values which works also with Strings. |
static NSDictionary |
dictionaryValueWithDefault(Object obj,
NSDictionary def)
Basic utility method for reading NSDictionary values
which also works with serialzed NSDictionarys. |
static float |
floatValue(Object obj)
Basic utility method for reading float values. |
static float |
floatValueWithDefault(Object obj,
float def)
Basic utility method for reading float values. |
static int |
intValue(Object obj)
Basic utility method for reading int values. |
static int |
intValueWithDefault(Object obj,
int def)
Basic utility method for reading int values. |
static long |
longValue(Object obj)
Basic utility method for reading long values. |
static long |
longValueForBindingOnComponentWithDefault(String binding,
WOComponent component,
long def)
This method resolves bindings from WOComponents to long values. |
static long |
longValueWithDefault(Object obj,
long def)
Basic utility method for reading long values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ERXValueUtilities()
| Method Detail |
|---|
public static boolean booleanValueForBindingOnComponentWithDefault(String binding,
WOComponent component,
boolean def)
public static boolean booleanValue(Object obj)
0, Strings are false if they equal (case insensitive)
'no', 'false' or parse to 0.
obj - object to be evaluated
public static boolean booleanValueWithDefault(Object obj,
boolean def)
String, a Number or a
ERXUtilities.BooleanOperation.
Numbers are false if they equal 0,
Strings are false if they equal (case insensitive)
'no', 'false' or parse to 0.
ERXUtilities.BooleanOperation are false if value
returns false.
The default value is used if the object is null.
obj - object to be evaluateddef - default value if object is null
public static int intValue(Object obj)
intValueWithDefault(Object, int)
with a default of 0.
obj - object to be evaluated
public static int intValueWithDefault(Object obj,
int def)
int values. The current
implementation tests if the object is an instance of
a String, Number and Boolean. Booleans are 1 if they equal
true. The default value is used if
the object is null or the boolean value is false.
obj - object to be evaluateddef - default value if object is null
public static float floatValue(Object obj)
floatValueWithDefault(Object, float)
with a default of 0.
obj - object to be evaluated
public static float floatValueWithDefault(Object obj,
float def)
float values. The current
implementation tests if the object is an instance of
a String, Number and Boolean. Booleans are 1 if they equal
true. The default value is used if
the object is null or the boolean value is false.
obj - object to be evaluateddef - default value if object is null
public static long longValueForBindingOnComponentWithDefault(String binding,
WOComponent component,
long def)
long values.
Note: This is only needed for non-syncronizing components
binding - name of the bindingcomponent - to resolve binding requestdef - default value if binding is not set
public static long longValue(Object obj)
longValueWithDefault(Object, long)
with a default of 0.
obj - object to be evaluated
public static long longValueWithDefault(Object obj,
long def)
long values. The current
implementation tests if the object is an instance of
a String, Number and Boolean. Booleans are 1 if they equal
true. The default value is used if
the object is null or the boolean value is false.
obj - object to be evaluateddef - default value if object is null
public static NSArray arrayValue(Object obj)
arrayValueWithDefault(Object, NSArray)
with a default of null.
obj - object to be evaluated
public static NSArray arrayValueWithDefault(Object obj,
NSArray def)
NSArray values
which also works with serialzed NSArrays and comma seperated items. The default value is used if
the object is null.
obj - object to be evaluateddef - default value if object is null
public static NSDictionary dictionaryValue(Object obj)
dictionaryValueWithDefault(Object, NSDictionary)
with a default of null.
obj - object to be evaluated
public static NSDictionary dictionaryValueWithDefault(Object obj,
NSDictionary def)
NSDictionary values
which also works with serialzed NSDictionarys. The default value is used if
the object is null.
obj - object to be evaluateddef - default value if object is null
public static BigDecimal bigDecimalValue(Object obj)
bigDecimalValueWithDefault(Object, BigDecimal)
with a default of null.
obj - object to be evaluated
public static BigDecimal bigDecimalValueWithDefault(Object obj,
BigDecimal def)
BigDecimal values.
The default value is used if the object is null.
obj - object to be evaluateddef - default value if object is null
|
Last updated: Thu, Nov 20, 2008 04:36 AM EST | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||