public class FahrenheitToCentigradeValueTransformer extends ValueTransformer<java.lang.Double>
Double
value transformer to convert temperatures
from Fahrenheit to Centigrade and to do the reverse.Constructor and Description |
---|
FahrenheitToCentigradeValueTransformer() |
Modifier and Type | Method and Description |
---|---|
boolean |
allowsReverseTransformation()
Returns true if the instance can do a reverse transformation.
|
java.lang.Double |
reverseTransformValue(java.lang.Double c)
Transforms a
Double with an assumed value of degrees
Centigrade into a Double with a value in degrees
Fahrenheit. |
java.lang.Double |
transformValue(java.lang.Double f)
Transforms a
Double with an assumed value of degrees
Fahrenheit into a Double with a value in degrees
Centrigrade. |
public FahrenheitToCentigradeValueTransformer()
public boolean allowsReverseTransformation()
false
.allowsReverseTransformation
in class ValueTransformer<java.lang.Double>
true
public java.lang.Double transformValue(java.lang.Double f)
Double
with an assumed value of degrees
Fahrenheit into a Double
with a value in degrees
Centrigrade.transformValue
in class ValueTransformer<java.lang.Double>
f
- object whose value is to be transformedpublic java.lang.Double reverseTransformValue(java.lang.Double c)
Double
with an assumed value of degrees
Centigrade into a Double
with a value in degrees
Fahrenheit.reverseTransformValue
in class ValueTransformer<java.lang.Double>
c
- Double
with value to be transformedDouble
with the transformed value of c