com.groovyj.jgprog.functions
Class TwoThings

java.lang.Object
  |
  +--com.groovyj.jgprog.Function
        |
        +--com.groovyj.jgprog.functions.TwoThings
All Implemented Interfaces:
java.io.Serializable

public class TwoThings
extends Function
implements java.io.Serializable

Do two things. This function's two children are the things to execute, and must be of void type.

Copyright (c) 2000 Robert Baruch. This code is released under the GNU General Public License (GPL).

Version:
$Id: TwoThings.java,v 1.1 2000/10/12 15:19:39 groovyjava Exp $
Author:
Robert Baruch (jgprog@sourceforge.net)
See Also:
Serialized Form

Fields inherited from class com.groovyj.jgprog.Function
arity, individual, returnType
 
Constructor Summary
TwoThings()
           
 
Method Summary
 void execute_void(Chromosome c, int n)
          Executes this node, returning nothing.
 Type getChildType(int n)
          Gets the type of node allowed form the given child number.
 java.lang.String getName()
          Gets the name of this node.
 
Methods inherited from class com.groovyj.jgprog.Function
execute_boolean, execute_double, execute_float, execute_int, execute_long, execute_object, execute, getArity, getReturnType, setIndividual, setReturnType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TwoThings

public TwoThings()
Method Detail

getName

public java.lang.String getName()
Description copied from class: Function
Gets the name of this node. Must be overridden in subclasses.
Overrides:
getName in class Function
Following copied from class: com.groovyj.jgprog.Function
Returns:
the name of this node.

getChildType

public Type getChildType(int n)
Description copied from class: Function
Gets the type of node allowed form the given child number. Must be overridden in subclasses.
Overrides:
getChildType in class Function
Following copied from class: com.groovyj.jgprog.Function
Parameters:
i - the child number
Returns:
the type of node allowed for that child

execute_void

public void execute_void(Chromosome c,
                         int n)
Description copied from class: Function
Executes this node, returning nothing.
Overrides:
execute_void in class Function
Following copied from class: com.groovyj.jgprog.Function
Throws:
UnsupportedOperationException - if the type of this node is not void