|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectecologylab.generic.Debug
ecologylab.xml.types.scalar.ScalarType<java.lang.Float>
ecologylab.xml.types.scalar.FloatType
public class FloatType
Type system entry for float, a built-in primitive.
| Field Summary | |
|---|---|
static float |
DEFAULT_VALUE
|
static java.lang.String |
DEFAULT_VALUE_STRING
|
| Fields inherited from class ecologylab.xml.types.scalar.ScalarType |
|---|
DEFAULT_DELIMS |
| Constructor Summary | |
|---|---|
FloatType()
This constructor should only be called once per session, through a static initializer, typically in TypeRegistry. |
|
| Method Summary | |
|---|---|
void |
appendValue(java.lang.Appendable buffy,
java.lang.reflect.Field field,
java.lang.Object context,
boolean needsEscaping)
Get the value from the Field, in the context. |
void |
appendValue(java.lang.StringBuilder buffy,
java.lang.reflect.Field field,
java.lang.Object context,
boolean needsEscaping)
Get the value from the Field, in the context. |
protected java.lang.String |
defaultValueString()
The default value for this type, as a String. |
java.lang.Float |
getInstance(java.lang.String value)
If this is a reference type, build an appropriate Object, given a String
representation. |
float |
getValue(java.lang.String valueString)
Convert the parameter to float. |
boolean |
isDefaultValue(java.lang.reflect.Field field,
java.lang.Object context)
True if the value in the Field object matches the default value for this type. |
boolean |
isFloatingPoint()
Since FloatType is a floating point value, returns true. |
boolean |
setField(java.lang.Object object,
java.lang.reflect.Field field,
java.lang.String value)
This is a primitive type, so we set it specially. |
java.lang.String |
toString(java.lang.reflect.Field field,
java.lang.Object context)
The string representation for a Field of this type |
| Methods inherited from class ecologylab.xml.types.scalar.ScalarType |
|---|
affordsInterestExpression, allowDelimitersInTokens, allowNewLines, appendValue, appendValue, composedOfTerms, defaultValue, defaultValueLength, delimeters, getClassName, getTypeClass, illegalChars, isDefaultValue, isPrimitive, isReference, marshall, needsEscaping, setFieldError |
| Methods inherited from class ecologylab.generic.Debug |
|---|
classSimpleName, closeLoggingFile, debug, debug, debug, debug, debugA, debugA, debugA, debugI, debugI, debugI, error, error, getClassName, getInteractive, getPackageName, getPackageName, getPackageName, initialize, level, level, level, logToFile, print, print, println, println, println, println, println, println, printlnA, printlnA, printlnA, printlnI, printlnI, printlnI, printlnI, setLoggingFile, show, show, superString, toggleInteractive, toString, toString, warning, warning, weird, weird |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final float DEFAULT_VALUE
public static final java.lang.String DEFAULT_VALUE_STRING
| Constructor Detail |
|---|
public FloatType()
To get the instance of this type object for use in translations, call
TypeRegistry.get("float").
| Method Detail |
|---|
public float getValue(java.lang.String valueString)
public java.lang.Float getInstance(java.lang.String value)
this is a reference type, build an appropriate Object, given a String
representation. If it is a primitive type, return a boxed value.
getInstance in class ScalarType<java.lang.Float>value - String representation of the instance.
public boolean setField(java.lang.Object object,
java.lang.reflect.Field field,
java.lang.String value)
setField in class ScalarType<java.lang.Float>object - The object whose field should be modified.field - The field to be set.value - String representation of the value to set the field to. This Type will convert the
value to the appropriate type, using getInstance(String) for reference types, and
type specific getValue(String) methods for primitive types.
ScalarType.setField(Object, Field, String)
public java.lang.String toString(java.lang.reflect.Field field,
java.lang.Object context)
toString in class ScalarType<java.lang.Float>protected java.lang.String defaultValueString()
defaultValueString in class ScalarType<java.lang.Float>public boolean isFloatingPoint()
isFloatingPoint in class ScalarType<java.lang.Float>
public boolean isDefaultValue(java.lang.reflect.Field field,
java.lang.Object context)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
isDefaultValue in class ScalarType<java.lang.Float>field -
java.lang.IllegalArgumentException
java.lang.IllegalAccessException
public void appendValue(java.lang.StringBuilder buffy,
java.lang.reflect.Field field,
java.lang.Object context,
boolean needsEscaping)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException
appendValue in class ScalarType<java.lang.Float>buffy - field - context - needsEscaping - TODO
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
public void appendValue(java.lang.Appendable buffy,
java.lang.reflect.Field field,
java.lang.Object context,
boolean needsEscaping)
throws java.lang.IllegalArgumentException,
java.lang.IllegalAccessException,
java.io.IOException
appendValue in class ScalarType<java.lang.Float>buffy - field - context - needsEscaping - TODO
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||