com.jgoodies.binding.value
Class ConverterFactory.DoubleToIntegerConverter

java.lang.Object
  extended by com.jgoodies.binding.value.ConverterFactory.DoubleToIntegerConverter
All Implemented Interfaces:
BindingConverter<Double,Integer>
Enclosing class:
ConverterFactory

public static final class ConverterFactory.DoubleToIntegerConverter
extends Object
implements BindingConverter<Double,Integer>

Converts Doubles to Integers and vice-versa.


Method Summary
 Double sourceValue(Integer targetValue)
          Converts a Double using the multiplier and sets it as new value.
 Integer targetValue(Double sourceValue)
          Converts the source value and returns a corresponding Integer value using the multiplier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

targetValue

public Integer targetValue(Double sourceValue)
Converts the source value and returns a corresponding Integer value using the multiplier.

Specified by:
targetValue in interface BindingConverter<Double,Integer>
Parameters:
sourceValue - the subject's value
Returns:
the converted subjectValue

sourceValue

public Double sourceValue(Integer targetValue)
Converts a Double using the multiplier and sets it as new value.

Specified by:
sourceValue in interface BindingConverter<Double,Integer>
Parameters:
targetValue - the Integer object that shall be converted
Returns:
the converted value


Copyright © 2002-2013 JGoodies Software GmbH. All Rights Reserved.