net.sf.jga.fn.adaptor
Class ApplyGenerator

java.lang.Object
  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 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[] gen()
          Generate one instance.
 Generator[] getGenerators()
           
 java.lang.String toString()
           
 
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()

gen

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

Specified by:
gen 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 Generator<java.lang.Object[]>

toString

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


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