org.rubato.logeo.predicates
Class FormPredicate

java.lang.Object
  extended by org.rubato.logeo.predicates.AbstractPredicate
      extended by org.rubato.logeo.predicates.FormPredicate
All Implemented Interfaces:
java.util.Comparator<Predicate>, Predicate

public class FormPredicate
extends AbstractPredicate

A predicate that matches denotators of a given form.

Author:
Gérard Milmeister

Constructor Summary
FormPredicate(Form form)
          Creates a predicate that satisfies denotator with the given form.
 
Method Summary
 boolean call(Denotator... denotators)
          Calls the predicate with a list of arguments.
 int getArity()
          Returns the arity of the predicate.
 Form getInputForm(int i)
          Returns the ith argument form.
 
Methods inherited from class org.rubato.logeo.predicates.AbstractPredicate
and, compare, getName, isCompatible, negated, or, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

FormPredicate

public FormPredicate(Form form)
Creates a predicate that satisfies denotator with the given form.

Method Detail

call

public boolean call(Denotator... denotators)
Description copied from class: AbstractPredicate
Calls the predicate with a list of arguments. The predicate must have arity equal to the length of the list.

Specified by:
call in interface Predicate
Specified by:
call in class AbstractPredicate

getArity

public int getArity()
Description copied from class: AbstractPredicate
Returns the arity of the predicate. Must be implemented in a subclass.

Specified by:
getArity in interface Predicate
Specified by:
getArity in class AbstractPredicate

getInputForm

public Form getInputForm(int i)
Description copied from class: AbstractPredicate
Returns the ith argument form. Must be implemented in a subclass.

Specified by:
getInputForm in interface Predicate
Specified by:
getInputForm in class AbstractPredicate