com.flagstone.transform.action
Class NewFunction.Builder

java.lang.Object
  extended by com.flagstone.transform.action.NewFunction.Builder
Enclosing class:
NewFunction

public static final class NewFunction.Builder
extends Object

The Builder class is used to generate a new NewFunction object using a small set of convenience methods.


Constructor Summary
NewFunction.Builder()
           
 
Method Summary
 NewFunction.Builder addAction(Action action)
          Add an action to the list of actions that will make up the body of the function.
 NewFunction build()
          Generate an NewFunction using the parameters defined in the Builder.
 NewFunction.Builder setArgument(String argName)
          Add the name of an argument to the list of arguments that will be passed to the function.
 NewFunction.Builder setName(String aString)
          Set the name of the function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NewFunction.Builder

public NewFunction.Builder()
Method Detail

setName

public NewFunction.Builder setName(String aString)
Set the name of the function. Must not be null or an empty string. The name defaults to an empty string so this method is not needed to define methods.

Parameters:
aString - the name of the function.
Returns:
this object.

setArgument

public NewFunction.Builder setArgument(String argName)
Add the name of an argument to the list of arguments that will be passed to the function. Must not be null of an empty string.

Parameters:
argName - the name of the argument.
Returns:
this object.

addAction

public NewFunction.Builder addAction(Action action)
Add an action to the list of actions that will make up the body of the function. Must not be null.

Parameters:
action - the action to add to the function body.
Returns:
this object.

build

public NewFunction build()
Generate an NewFunction using the parameters defined in the Builder.

Returns:
an initialized NewFunction object.


Copyright © 2002-2010 Flagstone Software Ltd.. All Rights Reserved.