net.sf.doolin.util
Class ReadOnlyNotNullBooleanAdapter

java.lang.Object
  extended by net.sf.doolin.util.ReadOnlyAdapter<Object,Boolean>
      extended by net.sf.doolin.util.ReadOnlyNotNullBooleanAdapter
All Implemented Interfaces:
Adapter<Object,Boolean>

public class ReadOnlyNotNullBooleanAdapter
extends ReadOnlyAdapter<Object,Boolean>

This adapter transforms any object into a Boolean by checking if the source object is not null.

Author:
Damien Coraboeuf

Field Summary
static ReadOnlyNotNullBooleanAdapter INSTANCE
          Common instance
 
Constructor Summary
ReadOnlyNotNullBooleanAdapter()
           
 
Method Summary
 Boolean convertSubjectToTarget(Object subjectValue)
          Returns true if subjectValue is not null.
 
Methods inherited from class net.sf.doolin.util.ReadOnlyAdapter
convertTargetToSubject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final ReadOnlyNotNullBooleanAdapter INSTANCE
Common instance

Constructor Detail

ReadOnlyNotNullBooleanAdapter

public ReadOnlyNotNullBooleanAdapter()
Method Detail

convertSubjectToTarget

public Boolean convertSubjectToTarget(Object subjectValue)
Returns true if subjectValue is not null.

Parameters:
subjectValue - Subject value
Returns:
Target value


Copyright © 2011. All Rights Reserved.