public interface AtomSet extends CloseableIterable<Atom>
Modifier and Type | Method and Description |
---|---|
boolean |
add(Atom atom)
Add the specified atom to this atom set if is not already present.
|
boolean |
addAll(AtomSet atoms) |
boolean |
addAll(CloseableIterator<? extends Atom> atoms)
Add the specified atom stream to this atom set.
|
CloseableIterator<Atom> |
atomsByPredicate(Predicate predicate)
Returns an iterator over all atoms with the specified predicate.
|
void |
clear() |
CloseableIterator<Constant> |
constantsIterator()
Returns an iterator over all constants in this atom set.
|
boolean |
contains(Atom atom)
Returns true if this atom set contains the specified atom.
|
Set<Constant> |
getConstants()
Returns a Set of all constants in this atom set.
|
TermGenerator |
getFreshSymbolGenerator() |
Set<Literal> |
getLiterals()
Returns a Set of all literals in this atom set.
|
Set<Predicate> |
getPredicates()
Returns a Set of all predicates in this atom set.
|
Set<Term> |
getTerms()
Returns a Set of all terms in this atom set.
|
Set<Term> |
getTerms(Term.Type type)
Deprecated.
|
Set<Variable> |
getVariables()
Returns a Set of all variables in this atom set.
|
boolean |
isEmpty() |
boolean |
isSubSetOf(AtomSet atomset)
Deprecated.
|
CloseableIterator<Atom> |
iterator()
Returns an iterator over the atoms in this atom set.
|
CloseableIterator<Literal> |
literalsIterator()
Returns an iterator over all literals in this atom set.
|
CloseableIterator<Atom> |
match(Atom atom)
Returns an iterator over atoms that match predicate and constants from
the specified atom.
|
CloseableIterator<Predicate> |
predicatesIterator()
Returns an iterator over all predicates in this atom set.
|
boolean |
remove(Atom atom)
Remove the specified atom from this this atom set.
|
boolean |
removeAll(AtomSet atoms) |
boolean |
removeAll(CloseableIterator<? extends Atom> atoms)
Remove the specified atom stream from this atom set.
|
CloseableIterator<Term> |
termsByPredicatePosition(Predicate p,
int position)
Returns an iterator over terms which are in a specific position in at
least one atom with the specified predicate.
|
CloseableIterator<Term> |
termsIterator()
Returns an iterator over all terms in this atom set.
|
CloseableIterator<Term> |
termsIterator(Term.Type type)
Deprecated.
|
CloseableIterator<Variable> |
variablesIterator()
Returns an iterator over all variables in this atom set.
|
boolean contains(Atom atom) throws AtomSetException
atom
- AtomSetException
CloseableIterator<Atom> match(Atom atom) throws AtomSetException
atom
- AtomSetException
CloseableIterator<Atom> atomsByPredicate(Predicate predicate) throws AtomSetException
predicate
- AtomSetException
CloseableIterator<Term> termsByPredicatePosition(Predicate p, int position) throws AtomSetException
p
- position
- the term position in atoms, positions starts from 0.AtomSetException
Set<Predicate> getPredicates() throws AtomSetException
AtomSetException
CloseableIterator<Predicate> predicatesIterator() throws AtomSetException
AtomSetException
Set<Term> getTerms() throws AtomSetException
AtomSetException
Set<Variable> getVariables() throws AtomSetException
AtomSetException
Set<Constant> getConstants() throws AtomSetException
AtomSetException
Set<Literal> getLiterals() throws AtomSetException
AtomSetException
@Deprecated Set<Term> getTerms(Term.Type type) throws AtomSetException
getVariables()
, getConstants()
or getLiterals()
instead.
type
- AtomSetException
CloseableIterator<Term> termsIterator() throws AtomSetException
AtomSetException
CloseableIterator<Variable> variablesIterator() throws AtomSetException
AtomSetException
CloseableIterator<Constant> constantsIterator() throws AtomSetException
AtomSetException
CloseableIterator<Literal> literalsIterator() throws AtomSetException
AtomSetException
@Deprecated CloseableIterator<Term> termsIterator(Term.Type type) throws AtomSetException
variablesIterator()
, constantsIterator()
or literalsIterator()
instead.
type
- AtomSetException
@Deprecated boolean isSubSetOf(AtomSet atomset) throws AtomSetException
atomset
- AtomSetException
boolean isEmpty() throws AtomSetException
AtomSetException
boolean add(Atom atom) throws AtomSetException
atom
- - atom to be added to this atom setAtomSetException
boolean addAll(CloseableIterator<? extends Atom> atoms) throws AtomSetException
atoms
- AtomSetException
boolean addAll(AtomSet atoms) throws AtomSetException
atoms
- AtomSetException
boolean remove(Atom atom) throws AtomSetException
atom
- - the atom to be removedAtomSetException
boolean removeAll(CloseableIterator<? extends Atom> atoms) throws AtomSetException
atoms
- - the atom stream to be removed.AtomSetException
boolean removeAll(AtomSet atoms) throws AtomSetException
AtomSetException
void clear() throws AtomSetException
AtomSetException
CloseableIterator<Atom> iterator()
iterator
in interface CloseableIterable<Atom>
TermGenerator getFreshSymbolGenerator()
Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.