com.jgoodies.binding.value
Class ConverterFactory.FloatToIntegerConverter

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

public static final class ConverterFactory.FloatToIntegerConverter
extends Object
implements BindingConverter<Float,Integer>

Converts Floats to Integers and vice-versa.


Method Summary
 Float sourceValue(Integer sourceValue)
          Converts a Float using the multiplier.
 Integer targetValue(Float sourceValue)
          Returns the converted source value for use by the binding target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

targetValue

public Integer targetValue(Float sourceValue)
Description copied from interface: BindingConverter
Returns the converted source value for use by the binding target. Equates to Format.format(Object) if the target accepts and provides Strings.

Specified by:
targetValue in interface BindingConverter<Float,Integer>
Parameters:
sourceValue - the value to convert
Returns:
an Integer that is the Float source value multiplied with this converter's multiplier

sourceValue

public Float sourceValue(Integer sourceValue)
Converts a Float using the multiplier.

Specified by:
sourceValue in interface BindingConverter<Float,Integer>
Parameters:
sourceValue - the value to convert
Returns:
the converted value


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