|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.c24.io.api.data.DataType
biz.c24.io.api.data.SimpleDataType
biz.c24.io.api.data.AtomicDataType
biz.c24.io.api.data.NumberDataType
public abstract class NumberDataType
A simple data type representing a number.
Warning: Serialized objects of this class or of a deployed class which is derived from it may not be compatible with future releases of C24 Integreation Objects. The current serialization support is appropriate for short term storage or RMI between applications running the same version of C24 Integreation Objects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class biz.c24.io.api.data.AtomicDataType |
---|
AtomicDataType.FinalEnum |
Field Summary | |
---|---|
static int |
DIGITS_UNBOUNDED
The value of a digit count that is unbounded. |
protected biz.c24.io.api.data.FormatPool |
formatPool
|
Fields inherited from class biz.c24.io.api.data.DataType |
---|
duringParsing, hasEnumerations, hasPatternMatching, qualifierValidation |
Method Summary | |
---|---|
Format |
createFormat(int idx)
Returns the format with specified index. |
String[] |
getAllFormatPatterns()
Returns the format pattern(s). |
int |
getBitLength()
Returns the bit length. |
String |
getCurrencySymbol()
Returns the currency symbol. |
char |
getDecimalSeparator()
Returns the decimal separator. |
String |
getFormatPattern()
Returns the main format pattern. |
int |
getFormatsCount()
Returns the defined formats count or 0 if there is no any. |
String |
getInternationalCurrencySymbol()
Returns the international currency symbol. |
Object |
getMaxExclusive()
Returns the maximum exclusive value (optional operation). |
int |
getMaxFractionDigits()
Returns the maximum fraction digits. |
Object |
getMaxInclusive()
Returns the maximum inclusive value (optional operation). |
int |
getMaxIntegerDigits()
Returns the maximum integer digits. |
int |
getMaxSize()
Returns the maximum allowable size of the value. |
int |
getMaxTotalDigits()
Returns the maximum total digits. |
Object |
getMinExclusive()
Returns the minimum exclusive value (optional operation). |
int |
getMinFractionDigits()
Returns the minimum fraction digits. |
Object |
getMinInclusive()
Returns the minimum inclusive value (optional operation). |
int |
getMinIntegerDigits()
Returns the minimum integer digits. |
int |
getMinSize()
Returns the minimum allowable size of the value. |
int |
getMinTotalDigits()
Returns the minimum total digits. |
char |
getMinusSign()
Returns the minus sign. |
char |
getMonetaryDecimalSeparator()
Returns the monetary decimal separator. |
NumberPatternInstanceEnum |
getPatternInstance()
Returns the pattern instance to use when localised. |
char |
getPercentSign()
Returns the percent sign. |
char |
getPermillSign()
Returns the permill sign. |
char |
getThousandSign()
Returns the thousand separator. |
Class |
getValidObjectClass()
Returns the class of valid objects of this type. |
boolean |
isDecimalSeparatorAlwaysShown()
Returns whether the decimal separator is always shown. |
boolean |
isDecimalSeparatorNeverShown()
Returns whether the decimal separator is never shown. |
boolean |
isFormatUsed()
Returns whether this type is using a number format. |
Object |
parseObject(String str,
boolean external)
Parses the supplied str into an object, possibly using the protected parseObjectExternal(String, java.text.ParsePosition) method. |
Object |
parseObject(String str,
boolean external,
ParsePosition pp)
Parses an object from str using the supplied parse position. |
void |
setAllFormatPatterns(String[] formatPattern)
Sets the format pattern(s). |
void |
setBitLength(int bitLength)
Sets the bit length. |
void |
setCurrencySymbol(String currencySymbol)
Sets the currency symbol. |
void |
setDecimalSeparator(char decimalSeparator)
Sets the decimal separator. |
void |
setDecimalSeparatorAlwaysShown(boolean decimalSeparatorAlwaysShown)
Sets whether the decimal separator is always shown. |
void |
setDecimalSeparatorNeverShown(boolean display)
Sets whether the decimal separator is never shown. |
void |
setFormatPattern(String formatPattern)
Sets the main format pattern. |
void |
setInternationalCurrencySymbol(String internationalCurrencySymbol)
Sets the international currency symbol. |
void |
setMaxExclusive(Object maxExclusive)
Sets the maximum exclusive value (optional operation). |
void |
setMaxFractionDigits(int maxFractionDigits)
Sets the maximum fraction digits. |
void |
setMaxInclusive(Object maxInclusive)
Sets the maximum inclusive value (optional operation). |
void |
setMaxIntegerDigits(int maxIntegerDigits)
Sets the maximum integer digits. |
void |
setMaxTotalDigits(int maxTotalDigits)
Sets the maximum total digits. |
void |
setMinExclusive(Object minExclusive)
Sets the minimum exclusive value (optional operation). |
void |
setMinFractionDigits(int minFractionDigits)
Sets the minimum fraction digits. |
void |
setMinInclusive(Object minInclusive)
Sets the minimum inclusive value (optional operation). |
void |
setMinIntegerDigits(int minIntegerDigits)
Sets the minimum integer digits. |
void |
setMinTotalDigits(int minTotalDigits)
Sets the minimum total digits. |
void |
setMinusSign(char minusSign)
Sets the minus sign. |
void |
setMonetaryDecimalSeparator(char monetaryDecimalSeparator)
Sets the monetay decimal separator. |
void |
setPatternInstance(NumberPatternInstanceEnum patternInstance)
Sets the pattern instance to use when localised. |
void |
setPercentSign(char percentSign)
Sets the percent sign. |
void |
setPermillSign(char permillSign)
Sets the permill sign. |
void |
setThousandSeparator(char thousandSeparator)
Sets the thouand separator. |
boolean |
validateProperties(Object object,
DataComponent comp,
ComplexDataObject context,
ValidationManager manager)
|
Methods inherited from class biz.c24.io.api.data.AtomicDataType |
---|
formatObject, formatObjectOverride, getFinal, getLocale, getPad, getPadAmount, getPadJustification, getWhiteSpace, setFinal, setLocale, setPad, setPadAmount, setPadJustification, setWhiteSpace |
Methods inherited from class biz.c24.io.api.data.SimpleDataType |
---|
formatObject, formatObjectExternal, getInstance, isComplex, isSimple, isSizeFixed, parseObject, parseObjectExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DIGITS_UNBOUNDED
protected transient biz.c24.io.api.data.FormatPool formatPool
Method Detail |
---|
public String getFormatPattern()
public String[] getAllFormatPatterns()
null
if no patterns have been
specified.
public void setFormatPattern(String formatPattern)
formatPattern
- The format pattern.public void setAllFormatPatterns(String[] formatPattern)
formatPattern
- The valid format pattern(s).public NumberPatternInstanceEnum getPatternInstance()
public void setPatternInstance(NumberPatternInstanceEnum patternInstance)
patternInstance
- The instance.public String getCurrencySymbol()
public void setCurrencySymbol(String currencySymbol)
currencySymbol
- The currency symbol.public String getInternationalCurrencySymbol()
public void setInternationalCurrencySymbol(String internationalCurrencySymbol)
internationalCurrencySymbol
- The international currency symbol.public char getMinusSign()
public void setMinusSign(char minusSign)
minusSign
- The minus sign.public char getPercentSign()
public void setPercentSign(char percentSign)
percentSign
- The percent sign.public char getPermillSign()
public void setPermillSign(char permillSign)
permillSign
- The permill sign.public char getThousandSign()
public void setThousandSeparator(char thousandSeparator)
thousandSeparator
- The thousand separator.public char getDecimalSeparator()
public void setDecimalSeparator(char decimalSeparator)
decimalSeparator
- The decimal separator.public char getMonetaryDecimalSeparator()
public void setMonetaryDecimalSeparator(char monetaryDecimalSeparator)
monetaryDecimalSeparator
- The monetary decimal separator.public boolean isDecimalSeparatorAlwaysShown()
public void setDecimalSeparatorAlwaysShown(boolean decimalSeparatorAlwaysShown)
decimalSeparatorAlwaysShown
- Whether the decimal separator is always shown.public boolean isDecimalSeparatorNeverShown()
public void setDecimalSeparatorNeverShown(boolean display)
display
- Whether the decimal separator is never shown.public int getMaxFractionDigits()
public int getMaxIntegerDigits()
public void setMaxIntegerDigits(int maxIntegerDigits)
maxIntegerDigits
- The maximum integer digits, or DIGITS_UNBOUNDED if there is no limit.
IllegalArgumentException
- if maxIntegerDigits < 0 && maxIntegerDigits != DIGITS_UNBOUNDED
.public int getMinIntegerDigits()
public void setMinIntegerDigits(int minIntegerDigits)
minIntegerDigits
- The minimum integer digits.
IllegalArgumentException
- if minIntegerDigits < 0public void setMaxFractionDigits(int maxFractionDigits)
maxFractionDigits
- The maximum fraction digits.
IllegalArgumentException
- if maxFractionDigits < 0 and maxFractionDigits != DIGITS_UNBOUNDED
.public int getMinFractionDigits()
public void setMinFractionDigits(int minFractionDigits)
minFractionDigits
- The minimum fraction digits.
IllegalArgumentException
- if minFractionDigits < 0public int getMaxTotalDigits()
public void setMaxTotalDigits(int maxTotalDigits)
maxTotalDigits
- The maximum total digits.
IllegalArgumentException
- if maxTotalDigits < 0 and maxTotalDigits != DIGITS_UNBOUNDED
.public int getMinTotalDigits()
public void setMinTotalDigits(int minTotalDigits)
minTotalDigits
- The minimum fraction digits.
IllegalArgumentException
- if minTotalDigits < 0public Object getMaxInclusive()
SimpleDataType
getMaxInclusive
in class SimpleDataType
public void setMaxInclusive(Object maxInclusive)
SimpleDataType
setMaxInclusive
in class SimpleDataType
maxInclusive
- The maximum inclusive value.public Object getMinInclusive()
SimpleDataType
getMinInclusive
in class SimpleDataType
public void setMinInclusive(Object minInclusive)
SimpleDataType
setMinInclusive
in class SimpleDataType
minInclusive
- The minimum inclusive value.public Object getMaxExclusive()
SimpleDataType
getMaxExclusive
in class SimpleDataType
public void setMaxExclusive(Object maxExclusive)
SimpleDataType
setMaxExclusive
in class SimpleDataType
maxExclusive
- The maximum exclusive value.public Object getMinExclusive()
SimpleDataType
getMinExclusive
in class SimpleDataType
public void setMinExclusive(Object minExclusive)
SimpleDataType
setMinExclusive
in class SimpleDataType
minExclusive
- The minimum exclusive value.public int getMinSize()
SimpleDataType
getMinSize
in class SimpleDataType
public int getMaxSize()
SimpleDataType
getMaxSize
in class SimpleDataType
-1
if the size is unbounded.public boolean isFormatUsed()
public int getBitLength()
public void setBitLength(int bitLength)
bitLength
- The new value.public Class getValidObjectClass()
DataType
getValidObjectClass
in class SimpleDataType
public boolean validateProperties(Object object, DataComponent comp, ComplexDataObject context, ValidationManager manager) throws ValidationException
validateProperties
in class SimpleDataType
ValidationException
public Object parseObject(String str, boolean external) throws ParserException
SimpleDataType
str
into an object, possibly using the protected parseObjectExternal(String, java.text.ParsePosition) method.
parseObject
in class AtomicDataType
str
- The string to be parsed.external
- Whether the parseObjectExternal(String, java.text.ParsePosition) method should be used.
ParserException
- If the parsing failed.public final Object parseObject(String str, boolean external, ParsePosition pp)
str
using the supplied parse position.
The parse position is used to determine where parsing should start and to notify the calling method of where
parsing finished. Note: this method does not force the parse process to use the entire input string.
str
- The string to be parsed.external
- Whether the parseObjectExternal(String, java.text.ParsePosition) method should be used.pp
- The parse position.
null
otherwise.public int getFormatsCount()
getFormatsCount
in interface FormatableDataType
public Format createFormat(int idx)
FormatableDataType
createFormat
in interface FormatableDataType
idx
- The index of requested format.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |