net.sf.jga.fn.adaptor
Class ApplyGenerator

java.lang.Object
  extended by net.sf.jga.fn.Functor<R>
      extended by net.sf.jga.fn.Generator<java.lang.Object[]>
          extended by net.sf.jga.fn.adaptor.ApplyGenerator
All Implemented Interfaces:
java.io.Serializable, Visitable

public class ApplyGenerator
extends Generator<java.lang.Object[]>

Generates an array containing the results produced by zero or more given generators.

Copyright © 2004-2005 David A. Hall

Author:
David A. Hall
See Also:
Serialized Form

Nested Class Summary
static interface ApplyGenerator.Visitor
          Interface for classes that may interpret an ApplyGenerator predicate.
 
Constructor Summary
ApplyGenerator(Generator<?>... generators)
           
 
Method Summary
 void accept(Visitor v)
          Calls the Visitor's visit(ApplyGenerator) method, if it implements the nested Visitor interface.
 java.lang.Object[] fn()
          Generate one instance.
 Generator<?>[] getGenerators()
           
 java.lang.String toString()
           
 
Methods inherited from class net.sf.jga.fn.Generator
bind0th, bindNth, eval
 
Methods inherited from class net.sf.jga.fn.Functor
composeNth, composeNth, generateNth
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplyGenerator

public ApplyGenerator(Generator<?>... generators)
Method Detail

getGenerators

public Generator<?>[] getGenerators()

fn

public java.lang.Object[] fn()
Description copied from class: Generator
Generate one instance.

Specified by:
fn in class Generator<java.lang.Object[]>

accept

public void accept(Visitor v)
Calls the Visitor's visit(ApplyGenerator) method, if it implements the nested Visitor interface.

Specified by:
accept in interface Visitable
Overrides:
accept in class Functor<java.lang.Object[]>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


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