com.jgoodies.binding.value
Class ConverterFactory.LongToIntegerConverter

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

public static final class ConverterFactory.LongToIntegerConverter
extends Object
implements BindingConverter<Long,Integer>

Converts Longs to Integers and vice-versa.


Method Summary
 Long sourceValue(Integer targetValue)
          Returns a Long that is the target Integer divided by this converter's multiplier.
 Integer targetValue(Long sourceValue)
          Returns an Integer that is the source Long multiplied with this converter's 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(Long sourceValue)
Returns an Integer that is the source Long multiplied with this converter's multiplier.

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

sourceValue

public Long sourceValue(Integer targetValue)
Returns a Long that is the target Integer divided by this converter's multiplier.

Specified by:
sourceValue in interface BindingConverter<Long,Integer>
Parameters:
targetValue - the Integer object that represents the percent value
Returns:
the converted value


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