org.rubato.logeo
Class Select

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

public final class Select
extends java.lang.Object

The select methods traverse a denotator and collect all parts of the denotator that satisfy a predicate.

Author:
Gérard Milmeister

Method Summary
static java.util.List<Denotator> select(Form f, Denotator d)
          Returns the nodes of form f from d.
static java.util.List<Denotator> select(Form f, Predicate p, Denotator d)
          Returns the nodes of form f from d that satisfy predicate p.
static java.util.List<Denotator> select(Predicate p, Denotator d)
          Returns the nodes from d that satisfy predicate p.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

select

public static java.util.List<Denotator> select(Predicate p,
                                               Denotator d)
                                        throws RubatoException
Returns the nodes from d that satisfy predicate p.

Parameters:
p - the predicate should be able to return a result for any form of denotator
Throws:
RubatoException

select

public static java.util.List<Denotator> select(Form f,
                                               Predicate p,
                                               Denotator d)
                                        throws RubatoException
Returns the nodes of form f from d that satisfy predicate p.

Parameters:
p - the predicate needs only to return a result for an argument of form f
Throws:
RubatoException

select

public static java.util.List<Denotator> select(Form f,
                                               Denotator d)
                                        throws RubatoException
Returns the nodes of form f from d.

Throws:
RubatoException