|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.farrago.type.runtime.NullablePrimitive
public abstract class NullablePrimitive
NullablePrimitive is the abstract superclass for implementations of NullableValue corresponding to Java primitives. These holder classes are declared as static inner classes of NullablePrimitive with names taken from the standard holder classes in java.lang.
| Nested Class Summary | |
|---|---|
static class |
NullablePrimitive.NullableBoolean
Nullable wrapper for boolean. |
static class |
NullablePrimitive.NullableByte
Nullable wrapper for byte. |
static class |
NullablePrimitive.NullableDouble
Nullable wrapper for double. |
static class |
NullablePrimitive.NullableFloat
Nullable wrapper for float. |
static class |
NullablePrimitive.NullableInteger
Nullable wrapper for int. |
static class |
NullablePrimitive.NullableLong
Nullable wrapper for long. |
static class |
NullablePrimitive.NullableShort
Nullable wrapper for short. |
| Field Summary | |
|---|---|
static String |
FALSE_LITERAL
|
private static Integer |
INT_ONE
|
private static Integer |
INT_ZERO
|
boolean |
isNull
Whether this value is null. |
static String |
NULL_IND_FIELD_NAME
Name of field storing null indicator. |
static String |
TRUE_LITERAL
|
static String |
UNKNOWN_LITERAL
|
static String |
VALUE_FIELD_NAME
Name of field storing value. |
| Fields inherited from interface net.sf.farrago.type.runtime.NullableValue |
|---|
NULL_IND_ACCESSOR_NAME, NULL_IND_MUTATOR_NAME |
| Fields inherited from interface net.sf.farrago.type.runtime.AssignableValue |
|---|
ASSIGNMENT_METHOD_NAME |
| Constructor Summary | |
|---|---|
NullablePrimitive()
|
|
| Method Summary | |
|---|---|
void |
assignFrom(Object obj)
Assigns value from an Object. |
Object |
getNullableData()
|
boolean |
isNull()
|
protected abstract void |
setLong(long n)
Assignment from non-null long value. |
void |
setNull(boolean isNull)
Sets whether or not the value is null. |
protected abstract void |
setNumber(Number number)
Assignment from abstract Number object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String VALUE_FIELD_NAME
public static final String TRUE_LITERAL
public static final String FALSE_LITERAL
public static final String UNKNOWN_LITERAL
public static final String NULL_IND_FIELD_NAME
private static final Integer INT_ONE
private static final Integer INT_ZERO
public boolean isNull
| Constructor Detail |
|---|
public NullablePrimitive()
| Method Detail |
|---|
public void setNull(boolean isNull)
NullableValue
setNull in interface NullableValueisNull - true to set a null value; false to indicate a non-null
valuepublic boolean isNull()
isNull in interface NullableValuepublic Object getNullableData()
getNullableData in interface DataValuepublic void assignFrom(Object obj)
AssignableValue
assignFrom in interface AssignableValueobj - value to assign, or null to set nullprotected abstract void setNumber(Number number)
number - a new non-null value to be assignedprotected abstract void setLong(long n)
n - long value to assignpublic String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||