com.jgoodies.binding.value
Class ConverterFactory.BooleanNegator

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

public static final class ConverterFactory.BooleanNegator
extends Object
implements BindingConverter<Boolean,Boolean>

Negates Booleans leaving null unchanged. Maps Boolean.TRUE to Boolean.FALSE, Boolean.FALSE to Boolean.TRUE, and null to null.


Constructor Summary
ConverterFactory.BooleanNegator()
           
 
Method Summary
 Boolean sourceValue(Boolean targetValue)
          Returns the negated target Boolean leaving null unchanged.
 Boolean targetValue(Boolean sourceValue)
          Returns the negated source Boolean leaving null unchanged.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConverterFactory.BooleanNegator

public ConverterFactory.BooleanNegator()
Method Detail

targetValue

public Boolean targetValue(Boolean sourceValue)
Returns the negated source Boolean leaving null unchanged.

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

sourceValue

public Boolean sourceValue(Boolean targetValue)
Returns the negated target Boolean leaving null unchanged.

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


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