net.sf.jga.parser
Class SetAndReturnField<T,V>

java.lang.Object
  extended by net.sf.jga.fn.Functor<R>
      extended by net.sf.jga.fn.BinaryFunctor<T,R,R>
          extended by net.sf.jga.fn.property.SetField<T,V>
              extended by net.sf.jga.parser.SetAndReturnField<T,V>
Type Parameters:
T -
V -
All Implemented Interfaces:
java.io.Serializable, Visitable

public class SetAndReturnField<T,V>
extends SetField<T,V>

Similar to the standard SetField functor, except that the fn() method returns the value passed rather than null

Author:
dave
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sf.jga.fn.property.SetField
SetField.Visitor
 
Constructor Summary
SetAndReturnField(java.lang.Class<T> argType, java.lang.reflect.Field field)
           
SetAndReturnField(java.lang.Class<T> argType, java.lang.reflect.Field field, java.lang.Class<V> fieldType)
           
SetAndReturnField(java.lang.Class<T> argType, java.lang.String fieldName, java.lang.Class<V> fieldType)
           
SetAndReturnField(java.lang.reflect.Field field)
           
 
Method Summary
 V fn(T obj, V value)
          Sets the designated field of the argument to the given value and returns null.
 
Methods inherited from class net.sf.jga.fn.property.SetField
accept, getFieldName, toString
 
Methods inherited from class net.sf.jga.fn.BinaryFunctor
bind, bind0th, bind1st, bind2nd, bindNth, compose, compose, composeNth, distribute, eval, generate, generate1st, generate2nd, generateNth
 
Methods inherited from class net.sf.jga.fn.Functor
composeNth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetAndReturnField

public SetAndReturnField(java.lang.reflect.Field field)

SetAndReturnField

public SetAndReturnField(java.lang.Class<T> argType,
                         java.lang.reflect.Field field)

SetAndReturnField

public SetAndReturnField(java.lang.Class<T> argType,
                         java.lang.reflect.Field field,
                         java.lang.Class<V> fieldType)

SetAndReturnField

public SetAndReturnField(java.lang.Class<T> argType,
                         java.lang.String fieldName,
                         java.lang.Class<V> fieldType)
Method Detail

fn

public V fn(T obj,
            V value)
Description copied from class: SetField
Sets the designated field of the argument to the given value and returns null.

Overrides:
fn in class SetField<T,V>
Returns:
null


Copyright © 2002-2006 David A. Hall. All Rights Reserved.