com.jgoodies.binding.value
Class ConverterFactory.IntegerConverter

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

public static final class ConverterFactory.IntegerConverter
extends Object
implements BindingConverter

Converts Integers using a given multiplier.


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

sourceValue

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

Specified by:
sourceValue in interface BindingConverter
Parameters:
newValue - 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.