com.jgoodies.binding.value
Class ConverterFactory.DoubleToIntegerConverter

java.lang.Object
  extended by com.jgoodies.binding.value.ConverterFactory.DoubleToIntegerConverter
All Implemented Interfaces:
BindingConverter
Enclosing class:
ConverterFactory

public static final class ConverterFactory.DoubleToIntegerConverter
extends Object
implements BindingConverter

Converts Doubles to Integers and vice-versa.


Method Summary
 Object sourceValue(Object targetValue)
          Converts a Double using the multiplier and sets it as new value.
 Object targetValue(Object sourceValue)
          Converts the subject's 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 Object targetValue(Object sourceValue)
Converts the subject's value and returns a corresponding Integer value using the multiplier.

Specified by:
targetValue in interface BindingConverter
Parameters:
sourceValue - the subject's value
Returns:
the converted subjectValue
Throws:
ClassCastException - if the subject value is not of type Double

sourceValue

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

Specified by:
sourceValue in interface BindingConverter
Parameters:
targetValue - the Integer object that shall be converted
Returns:
the converted value
Throws:
ClassCastException - if the new value is not of type Integer


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