net.sf.jga.fn
Class Generator<R>

java.lang.Object
  extended by net.sf.jga.fn.Generator<R>
All Implemented Interfaces:
java.io.Serializable, Visitable
Direct Known Subclasses:
AndGenerator, ApplyGenerator, Bind, ConditionalGenerator, Constant, ConstructDefault, Generate, OrGenerator, Random

public abstract class Generator<R>
extends java.lang.Object
implements java.io.Serializable, Visitable

Functor that takes no arguments and produces a single result. The result is not guaranteed to be the same each time the functor is called.

Copyright © 2004 David A. Hall

Author:
David A. Hall
See Also:
Serialized Form

Constructor Summary
Generator()
           
 
Method Summary
 void accept(Visitor v)
          No-op implementation of Visitable interface.
abstract  R gen()
          Generate one instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator()
Method Detail

gen

public abstract R gen()
Generate one instance.


accept

public void accept(Visitor v)
No-op implementation of Visitable interface.

Specified by:
accept in interface Visitable


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