de.grogra.rgg
Class BooleanSynth<T>

java.lang.Object
  extended by de.grogra.rgg.BooleanSynth<T>
Type Parameters:
T - the type of objects for which synthesized attributes are computed
All Implemented Interfaces:
VoidToBooleanGenerator

public final class BooleanSynth<T>
extends java.lang.Object
implements VoidToBooleanGenerator

Instances of BooleanSynth are used in the context of the method Library.synthesize(Object, ObjectToObjectGenerator, ObjectToBoolean). and represent the information needed for the computation of a synthesized attribute: object is the current object for which the synthesized attribute has to be computed, the generator method evaluateBoolean yields the values of the synthesized attributes of object's descendants.

Author:
Ole Kniemeyer

Field Summary
 T object
          The current object.
 
Constructor Summary
BooleanSynth()
           
 
Method Summary
 void evaluateBoolean(BooleanConsumer cons)
          This generator method yields the values of the synthesized attribute for every descendant of object.
 boolean get(int index)
           
 int size()
           
 void values(BooleanConsumer cons)
          This method is an alias for evaluateBoolean(de.grogra.xl.lang.BooleanConsumer).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

object

public T object
The current object.

Constructor Detail

BooleanSynth

public BooleanSynth()
Method Detail

evaluateBoolean

public void evaluateBoolean(BooleanConsumer cons)
This generator method yields the values of the synthesized attribute for every descendant of object. These values have been computed previously.

Specified by:
evaluateBoolean in interface VoidToBooleanGenerator
Parameters:
cons - the consumer which receives the values of synthesized attribute of descendants

get

public boolean get(int index)

size

public int size()

values

public void values(BooleanConsumer cons)
This method is an alias for evaluateBoolean(de.grogra.xl.lang.BooleanConsumer).