public class LinkedListAtomSet extends AbstractInMemoryAtomSet implements InMemoryAtomSet
Constructor and Description |
---|
LinkedListAtomSet() |
LinkedListAtomSet(Atom... atoms) |
LinkedListAtomSet(AtomSet atomset)
copy constructor
|
LinkedListAtomSet(CloseableIterator<Atom> it) |
LinkedListAtomSet(CloseableIteratorWithoutException<Atom> it) |
LinkedListAtomSet(InMemoryAtomSet atomset)
copy constructor
|
LinkedListAtomSet(LinkedList<Atom> list) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(Atom atom)
Add the specified atom to this atom set if is not already present.
|
CloseableIteratorWithoutException<Atom> |
atomsByPredicate(Predicate p)
Returns an iterator over all atoms with the specified predicate.
|
void |
clear() |
ConstantGenerator |
getFreshSymbolGenerator() |
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.
|
boolean |
isEmpty() |
CloseableIteratorWithoutException<Atom> |
iterator()
Returns an iterator over the atoms in this atom set.
|
CloseableIteratorWithoutException<Atom> |
match(Atom atom)
Returns an iterator over atoms that match predicate and constants from
the specified atom.
|
CloseableIteratorWithoutException<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.
|
int |
size() |
CloseableIteratorWithoutException<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.
|
CloseableIteratorWithoutException<Term> |
termsIterator()
Returns an iterator over all terms in this atom set.
|
CloseableIteratorWithoutException<Term> |
termsIterator(Term.Type type)
Deprecated.
|
addAll, addAll, constantsIterator, contains, getConstants, getLiterals, getVariables, isSubSetOf, literalsIterator, removeAll, removeAll, variablesIterator
addAll, addAll, equals, equals, removeAll, removeAll, toString
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addAll, addAll, constantsIterator, contains, getConstants, getLiterals, getVariables, isSubSetOf, literalsIterator, removeAll, removeAll, variablesIterator
public LinkedListAtomSet()
public LinkedListAtomSet(LinkedList<Atom> list)
public LinkedListAtomSet(Atom... atoms)
public LinkedListAtomSet(CloseableIterator<Atom> it) throws IteratorException
IteratorException
public LinkedListAtomSet(CloseableIteratorWithoutException<Atom> it)
public LinkedListAtomSet(AtomSet atomset) throws IteratorException
IteratorException
public LinkedListAtomSet(InMemoryAtomSet atomset)
public CloseableIteratorWithoutException<Atom> match(Atom atom)
AtomSet
match
in interface AtomSet
match
in interface InMemoryAtomSet
public CloseableIteratorWithoutException<Atom> atomsByPredicate(Predicate p)
AtomSet
atomsByPredicate
in interface AtomSet
atomsByPredicate
in interface InMemoryAtomSet
public CloseableIteratorWithoutException<Term> termsByPredicatePosition(Predicate p, int position)
AtomSet
termsByPredicatePosition
in interface AtomSet
termsByPredicatePosition
in interface InMemoryAtomSet
position
- the term position in atoms, positions starts from 0.public Set<Predicate> getPredicates()
AtomSet
getPredicates
in interface AtomSet
getPredicates
in interface InMemoryAtomSet
getPredicates
in class AbstractInMemoryAtomSet
public CloseableIteratorWithoutException<Predicate> predicatesIterator()
AtomSet
predicatesIterator
in interface AtomSet
predicatesIterator
in interface InMemoryAtomSet
public boolean add(Atom atom)
AtomSet
add
in interface AtomSet
add
in interface InMemoryAtomSet
atom
- - atom to be added to this atom setpublic Set<Term> getTerms()
AtomSet
getTerms
in interface AtomSet
getTerms
in interface InMemoryAtomSet
getTerms
in class AbstractInMemoryAtomSet
public ConstantGenerator getFreshSymbolGenerator()
getFreshSymbolGenerator
in interface AtomSet
public CloseableIteratorWithoutException<Term> termsIterator()
AtomSet
termsIterator
in interface AtomSet
termsIterator
in interface InMemoryAtomSet
@Deprecated public Set<Term> getTerms(Term.Type type)
AtomSet
AtomSet.getVariables()
, AtomSet.getConstants()
or AtomSet.getLiterals()
instead.
getTerms
in interface AtomSet
getTerms
in interface InMemoryAtomSet
getTerms
in class AbstractInMemoryAtomSet
@Deprecated public CloseableIteratorWithoutException<Term> termsIterator(Term.Type type)
AtomSet
AtomSet.variablesIterator()
, AtomSet.constantsIterator()
or AtomSet.literalsIterator()
instead.
termsIterator
in interface AtomSet
termsIterator
in interface InMemoryAtomSet
public boolean remove(Atom atom)
AtomSet
remove
in interface AtomSet
remove
in interface InMemoryAtomSet
atom
- - the atom to be removedpublic CloseableIteratorWithoutException<Atom> iterator()
AtomSet
iterator
in interface AtomSet
iterator
in interface InMemoryAtomSet
iterator
in interface CloseableIterable<Atom>
iterator
in interface CloseableIterableWithoutException<Atom>
public boolean isEmpty()
isEmpty
in interface AtomSet
isEmpty
in interface InMemoryAtomSet
isEmpty
in class AbstractInMemoryAtomSet
public int size()
public void clear()
clear
in interface AtomSet
clear
in interface InMemoryAtomSet
Copyright © 2014–2018 GraphIK (INRIA - LIRMM). All rights reserved.