|
|||||||||
| Home >> All >> org >> apache >> hivemind >> schema >> [ rules overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.hivemind.schema.rules
Class DoubleTranslator

java.lang.Objectorg.apache.hivemind.schema.rules.DoubleTranslator
- All Implemented Interfaces:
- org.apache.hivemind.schema.Translator
- public class DoubleTranslator
- extends java.lang.Object
- implements org.apache.hivemind.schema.Translator
- extends java.lang.Object
Translates strings to integer values.
| Field Summary | |
private double |
_defaultValue
|
private boolean |
_isMaxValue
|
private boolean |
_isMinValue
|
private double |
_maxValue
|
private double |
_minValue
|
| Constructor Summary | |
DoubleTranslator()
|
|
DoubleTranslator(java.lang.String initializer)
Initializers: default: default value for empty or invalid input min: minimum acceptible value max: maximum acceptible value |
|
| Method Summary | |
java.lang.Object |
translate(org.apache.hivemind.internal.Module contributingModule,
java.lang.Class propertyType,
java.lang.String inputValue,
org.apache.hivemind.Location location)
Converts the string to an Double. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
_minValue
private double _minValue
_isMinValue
private boolean _isMinValue
_maxValue
private double _maxValue
_isMaxValue
private boolean _isMaxValue
_defaultValue
private double _defaultValue
| Constructor Detail |
DoubleTranslator
public DoubleTranslator()
DoubleTranslator
public DoubleTranslator(java.lang.String initializer)
- Initializers:
- default: default value for empty or invalid input
- min: minimum acceptible value
- max: maximum acceptible value
| Method Detail |
translate
public java.lang.Object translate(org.apache.hivemind.internal.Module contributingModule, java.lang.Class propertyType, java.lang.String inputValue, org.apache.hivemind.Location location)
- Converts the string to an Double. The empty string is returned as zero.
On failure, an error is logged and the method returns zero.
- Specified by:
translatein interfaceorg.apache.hivemind.schema.Translator
|
|||||||||
| Home >> All >> org >> apache >> hivemind >> schema >> [ rules overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.hivemind.schema.rules.DoubleTranslator