com.jgoodies.binding.value
Class ConverterFactory.LongToIntegerConverter

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

public static final class ConverterFactory.LongToIntegerConverter
extends Object
implements BindingConverter

Converts Longs to Integers and vice-versa.


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

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

sourceValue

public Object sourceValue(Object targetValue)
Converts an Integer to Long and sets it as new value.

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


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