de.grogra.rgg
Class DoubleSynth<T>
java.lang.Object
de.grogra.rgg.DoubleSynth<T>
- Type Parameters:
T
- the type of objects for which synthesized attributes are computed
- All Implemented Interfaces:
- VoidToDoubleGenerator
public final class DoubleSynth<T>
- extends java.lang.Object
- implements VoidToDoubleGenerator
Instances of DoubleSynth
are used in the context of the method
Library.synthesize(Object, ObjectToObjectGenerator, ObjectToDouble)
.
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
evaluateDouble
yields the values of the synthesized attributes of
object
's descendants.
- Author:
- Ole Kniemeyer
Field Summary |
T |
object
The current object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
object
public T object
- The current object.
DoubleSynth
public DoubleSynth()
evaluateDouble
public void evaluateDouble(DoubleConsumer cons)
- This generator method yields the values of the synthesized attribute
for every descendant of
object
. These values have been
computed previously.
- Specified by:
evaluateDouble
in interface VoidToDoubleGenerator
- Parameters:
cons
- the consumer which receives the values of synthesized
attribute of descendants
get
public double get(int index)
size
public int size()
values
public void values(DoubleConsumer cons)
- This method is an alias for
evaluateDouble(de.grogra.xl.lang.DoubleConsumer)
.