org.rubato.logeo
Class Map

java.lang.Object
  extended by org.rubato.logeo.Map

public final class Map
extends java.lang.Object

Static methods for mapping function onto denotators.

Author:
Gérard Milmeister

Method Summary
static Denotator map(Denotator d, Form form, Function f)
          Maps the function fun to the denotator d for every part of denotator that matches the given form.
static Denotator map(Denotator d, Predicate p, Function f)
          Maps the function fun to the denotator d for every part of the denotator that satisfies the given predicate p.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

map

public static Denotator map(Denotator d,
                            Form form,
                            Function f)
                     throws RubatoException
Maps the function fun to the denotator d for every part of denotator that matches the given form.

Parameters:
d - the denotator that the function is applied to
form - the form of the parts that get mapped
f - the function that is applied
Returns:
the mapped denotator
Throws:
RubatoException - if mapping fails

map

public static Denotator map(Denotator d,
                            Predicate p,
                            Function f)
                     throws RubatoException
Maps the function fun to the denotator d for every part of the denotator that satisfies the given predicate p.

Parameters:
d - the denotator that the function is applied to
p - the predicate that a part must satisfy for the function to be applied
f - the function that is applied
Returns:
the mapped denotator
Throws:
RubatoException - if mapping fails