|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.text.Format
com.davisor.data.Type
com.davisor.data.LocaleType
com.davisor.data.FormatType
com.davisor.data.SimpleNumberType
com.davisor.data.DoubleType
com.davisor.data.ChoiceType
ChoiceType extends the DoubleType class by a choice formatting option, as defined by the standard Java ChoiceFormat class. ChoiceType specification strings will be passed to an underlying ChoiceFormat instance that will be used to format data values of the choice type.
EnumType,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class java.text.Format |
java.text.Format.Field |
| Field Summary | |
static java.lang.String |
TYPENAME
Type name ("CHOICE"). |
| Fields inherited from class com.davisor.data.DoubleType |
DEFAULT |
| Fields inherited from class com.davisor.data.FormatType |
M_pattern, M_sample |
| Fields inherited from class com.davisor.data.LocaleType |
DEFAULT_LOCALE, M_locale |
| Fields inherited from class com.davisor.data.Type |
METADATA_GROUP, METADATA_NAME, METADATA_PARENT, METADATA_SUBCHANNELS |
| Constructor Summary | |
|
ChoiceType()
Default constructor. |
|
ChoiceType(ChoiceType ct)
Copy constructor. |
|
ChoiceType(java.lang.String dataName)
Creates a new default type with no identity. |
|
ChoiceType(java.lang.String dataName,
java.lang.String id,
java.util.Map metaData,
java.util.Locale locale,
java.lang.String pattern,
java.lang.Object sample)
Creates a new choice type. |
|
ChoiceType(java.lang.String dataName,
java.lang.String id,
java.lang.String format)
Creates a new choice data type from a choice pattern. |
protected |
ChoiceType(java.lang.String typeName,
java.lang.String dataName,
java.lang.String id,
java.util.Map metaData,
java.util.Locale locale,
java.lang.String pattern,
java.lang.Object sample)
Creates a new choice type. |
| Method Summary | |
protected java.text.Format |
createFormatter()
Creates a new format instance suitable for the purposes of this class. |
com.davisor.core.Dupable |
dup()
Makes a deep copy of this object. |
float |
getCompatibility(java.lang.Class type)
Gets an estimate of how well this type could represent objects of the given class. |
| Methods inherited from class com.davisor.data.DoubleType |
decode, encode, equals, getSQLCode, getValueClass, toData, toData, toData, toData |
| Methods inherited from class com.davisor.data.SimpleNumberType |
byteValue, byteValue, doubleValue, doubleValue, floatValue, floatValue, intValue, intValue, longValue, longValue, numberValue, shortValue, shortValue, stringValue, stringValue, stringValue, stringValue, stringValue, stringValue, stringValue, zero |
| Methods inherited from class com.davisor.data.FormatType |
clearFormatter, getFormat, getFormatter, getPattern, getSample, hashCode, setFormat, setFormat, setLocale, setPattern, setSample |
| Methods inherited from class com.davisor.data.LocaleType |
getLocale, setLocale |
| Methods inherited from class com.davisor.data.Type |
ceil, check, check, compare, create, create, create, create, create, dup, floor, format, getDataName, getId, getID, getMetaData, getMetaData, getSpecs, getSQLName, getSQLName, getTypeName, isNull, parseObject, register, register, setDataName, setId, setID, setMetaData, setMetaData, setSpecs, toString, toXML, xmlEnd, xmlStart |
| Methods inherited from class java.text.Format |
clone, format, formatToCharacterIterator, parseObject |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String TYPENAME
| Constructor Detail |
public ChoiceType()
public ChoiceType(ChoiceType ct)
public ChoiceType(java.lang.String dataName)
dataName - data name (may be null)
public ChoiceType(java.lang.String dataName,
java.lang.String id,
java.lang.String format)
This is the constructor the SQL type mapper Type.create(Integer,String,String,String) method will call to
create a type that matches given SQL type.
dataName - data name (may be null)id - type identity (may be null)format - Java ChoiceFormat choice pattern (may be null)FormatType.setFormat(java.util.Locale, java.lang.String)
public ChoiceType(java.lang.String dataName,
java.lang.String id,
java.util.Map metaData,
java.util.Locale locale,
java.lang.String pattern,
java.lang.Object sample)
dataName - data name (may be null)id - type identity (may be null)metaData - type meta data map (may be null)locale - type locale (may be null)pattern - format pattern (may be null)sample - format sample (may be null)
protected ChoiceType(java.lang.String typeName,
java.lang.String dataName,
java.lang.String id,
java.util.Map metaData,
java.util.Locale locale,
java.lang.String pattern,
java.lang.Object sample)
typeName - type namedataName - data name (may be null)id - type identity (may be null)metaData - type meta data map (may be null)locale - type locale (may be null)pattern - format pattern (may be null)sample - format sample (may be null)| Method Detail |
public com.davisor.core.Dupable dup()
dup in interface com.davisor.core.Dupabledup in class DoubleTypeprotected java.text.Format createFormatter()
createFormatter in class SimpleNumberTypeFormatType.clearFormatter(),
FormatType.getFormatter(),
FormatType.setFormat(Locale,String),
FormatType.setLocale(Locale),
FormatType.setPattern(String)public float getCompatibility(java.lang.Class type)
getCompatibility in class Typetype - type to estimate
DoubleType.getValueClass()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||