Interface PredicateFactory
- All Superinterfaces:
fr.inria.rules.dlgpereader.builder.api.IPredicateFactory
- All Known Implementing Classes:
SameObjectPredicateFactory
public interface PredicateFactory
extends fr.inria.rules.dlgpereader.builder.api.IPredicateFactory
Factory to create predicates
- Author:
- Florent Tornil
-
Method Summary
Modifier and TypeMethodDescriptioncreateOrGetFreshPredicate(int arity) Creates a new predicate which won't be equal to another previously created predicate.createOrGetPredicate(String label, int arity) Two object created by a call to this function with the same label and arity argument must be equals according to the definition given by thePredicateimplementation usedbooleanforgetPredicate(String label) Forgets a previously created (non fresh) predicate.getPredicate(String label) Gets a previously created predicate.
-
Method Details
-
createOrGetPredicate
Two object created by a call to this function with the same label and arity argument must be equals according to the definition given by thePredicateimplementation used- Specified by:
createOrGetPredicatein interfacefr.inria.rules.dlgpereader.builder.api.IPredicateFactory- Parameters:
label- the labelarity- the arity- Returns:
- a predicate with the given label and arity
-
createOrGetFreshPredicate
Creates a new predicate which won't be equal to another previously created predicate.
The label of the predicate may already exist in some rare cases- Parameters:
arity- the arity- Returns:
- a fresh predicate with the given label and arity
-
forgetPredicate
Forgets a previously created (non fresh) predicate.
This predicate will no longer be considered as already existing in the factory.- Parameters:
label- the label of the previously created predicate- Returns:
- true iff such a predicate already exists in the factory, and thus forgets it.
-
getPredicate
-