|
ProgramixGenericLib v5.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.programix.value.ValueFactory
public class ValueFactory
Used to create instances classes that implement the Value
interface. All implementations returned are Serializable,
as long as the Object passed in is also Serializable.
| Field Summary | |
|---|---|
static Value |
NULL_INSTANCE
A fixed, shareable Value that represents an internal value of null. |
static Value |
ZERO_LEN_STRING_INSTANCE
A fixed, shareable Value that represents an internal value of a zero-length String. |
| Method Summary | |
|---|---|
static Value |
create(BigDecimal value)
Creates a instance encapsulating the specified value. |
static Value |
create(byte[] data)
Creates a instance encapsulating the specified byte[] value. |
static Value |
create(DateTime dateTime)
Creates a instance encapsulating the specified DateTime value. |
static Value |
create(double value)
Creates a new Value encapsulating the specified
double value. |
static Value |
create(int value)
Creates a new Value encapsulating the specified
int value. |
static Value |
create(long value)
Creates a new Value encapsulating the specified
long value. |
static Value |
create(Number value)
Creates a instance encapsulating the specified value. |
static Value |
create(Object value)
Creates a instance encapsulating the specified value. |
static Value |
create(PlainDate plainDate)
Creates a instance encapsulating the specified PlainDate value. |
static Value |
create(String rawString)
Creates a instance encapsulating the specified String value. |
static Value |
create(String rawString,
String trimmedString)
Creates a instance encapsulating the specified String value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Value NULL_INSTANCE
Value are:
isNull() always returns true.isEmpty() always returns true.isNumeric() always returns
false.isDateTime() always returns
false.getString() always returns "".getRawString() always
returns "".
public static final Value ZERO_LEN_STRING_INSTANCE
Value are:
isNull() always returns false.isEmpty() always returns true.isNumeric() always returns
false.isDateTime() always returns
false.getString() always returns "".getRawString() always
returns "".
| Method Detail |
|---|
public static Value create(Object value)
value - the value to be encapsulated.
NULL_INSTANCE is returned if the
passed parameter is null.public static Value create(String rawString)
Equivalent to:
return create(rawString, null);
rawString - the String to be encapsulated.
NULL_INSTANCE is returned if the
passed parameter is null. ZERO_LEN_STRING_INSTANCE
is returned if the passed parameter is a String with a length
of zero.
public static Value create(String rawString,
String trimmedString)
create(String rawString) method instead).
For an explanation of "trimmed" and "raw", see the
getString() and the
getRawString() methods on Value.
rawString - the value to be encapsulated.trimmedString - the rawString with leading and trailing
whitespace removed, or null if the trimmed version should be
calculated from rawString.
NULL_INSTANCE is returned if the
passed parameter rawString is null.
ZERO_LEN_STRING_INSTANCE is returned if the passed parameter
rawString is a String with a length of zero.public static Value create(Number value)
value - the value to be encapsulated.
NULL_INSTANCE is returned if the
passed parameter is null.public static Value create(BigDecimal value)
value - the value to be encapsulated.
NULL_INSTANCE is returned if the
passed parameter is null.public static Value create(int value)
Value encapsulating the specified
int value.
public static Value create(long value)
Value encapsulating the specified
long value.
public static Value create(double value)
Value encapsulating the specified
double value.
public static Value create(DateTime dateTime)
DateTime value.
dateTime - the value to be encapsulated.
NULL_INSTANCE is returned if the
passed parameter is null.public static Value create(PlainDate plainDate)
PlainDate value.
plainDate - the value to be encapsulated.
NULL_INSTANCE is returned if the
passed parameter is null.public static Value create(byte[] data)
data - the value to be encapsulated.
NULL_INSTANCE is returned if the
passed parameter is null.
|
ProgramixGenericLib v5.0.1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||