Interface IndexableFactCollection
- All Known Subinterfaces:
FactIndexer
- All Known Implementing Classes:
ConcurrentFactIndexer
public interface IndexableFactCollection
A fixed collection of facts that only allows a basic query operation: return the atoms in the
collection that might match a given atom.
-
Method Summary
Modifier and TypeMethodDescriptiongetPreds()
Returns the set of the predicate symbols represented in this collection.indexInto
(PositiveAtom atom) Returns the atoms in the collection that potentially "match" the provided atom.indexInto
(PositiveAtom atom, ConstOnlySubstitution subst) Returns the atoms in the collection that potentially "match" the provided atom, after the given substitution has been applied.indexInto
(PredicateSym pred) Returns the atoms in the collection with the given predicate symbol.boolean
isEmpty()
Returns whether the collection is empty.
-
Method Details
-
indexInto
Returns the atoms in the collection that potentially "match" the provided atom. There is no guarantee that the returned atoms can actually be unified with the provided atom.- Parameters:
atom
- the atom to match- Returns:
- the matching facts
-
indexInto
Returns the atoms in the collection that potentially "match" the provided atom, after the given substitution has been applied. There is no guarantee that the returned atoms can actually be unified with the provided atom.- Parameters:
atom
- the atom to match- Returns:
- the matching facts
-
indexInto
Returns the atoms in the collection with the given predicate symbol.- Parameters:
pred
- the predicate symbol- Returns:
- the matching facts
-
isEmpty
boolean isEmpty()Returns whether the collection is empty.- Returns:
- whether the collection is empty
-
getPreds
Set<PredicateSym> getPreds()Returns the set of the predicate symbols represented in this collection.- Returns:
- the predicate symbols
-