Class LinkedListAtomSet
java.lang.Object
fr.lirmm.graphik.integraal.core.atomset.AbstractAtomSet
fr.lirmm.graphik.integraal.core.atomset.AbstractInMemoryAtomSet
fr.lirmm.graphik.integraal.core.atomset.LinkedListAtomSet
- All Implemented Interfaces:
AtomSet, InMemoryAtomSet, CloseableIterable<Atom>, CloseableIterableWithoutException<Atom>, Iterable<Atom>
@Deprecated
public class LinkedListAtomSet
extends AbstractInMemoryAtomSet
implements InMemoryAtomSet
Deprecated.
An AtomSet based on a LinkedList of Atom
This class is deprecated. Use DefaultInMemoryAtomSet instead.
If you want an AtomSet where you can access the elements in the order
they were added into the set, use the DefaultInMemoryAtomSet with a
LinkedHashSet : new DefaultInMemoryAtomSet(new LinkedHashSet of Atom()).
- Author:
- Clément Sipieter (INRIA) clement@6pi.fr
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates an empty linked-list-based atom set.LinkedListAtomSet(Atom... atoms) Deprecated.Creates an atom set initialized with the given atoms.LinkedListAtomSet(AtomSet atomset) Deprecated.copy constructorLinkedListAtomSet(InMemoryAtomSet atomset) Deprecated.copy constructorDeprecated.Creates an atom set by consuming the given iterator.Deprecated.Creates an atom set by consuming the given iterator.LinkedListAtomSet(LinkedList<Atom> list) Deprecated.Creates an atom set backed by the given linked list. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Add the specified atom to this atom set if is not already present.Deprecated.Returns an iterator over all atoms with the specified predicate.voidclear()Deprecated.Removes all atoms from this atom set.Deprecated.Returns the fresh symbol generator associated with this atom set.Deprecated.Returns a Set of all predicates in this atom set.getTerms()Deprecated.Returns a Set of all terms in this atom set.Deprecated.booleanisEmpty()Deprecated.Returns whether this atom set contains no atom.iterator()Deprecated.Returns an iterator over the atoms in this atom set.match(Atom atom, Substitution s) Deprecated.Returns an iterator over atoms that match predicate and constants from the specified atom.Deprecated.Returns an iterator over all predicates in this atom set.booleanDeprecated.Remove the specified atom from this this atom set.voidremoveWithoutCheck(Atom atom) Deprecated.Remove the specified atom from this this atom set.intsize()Deprecated.This default implementation should be overriden, it is convenient for in memory set, but will be inefficient in some case.termsByPredicatePosition(Predicate p, int position) Deprecated.Returns an iterator over terms which are in a specific position in at least one atom with the specified predicate.Deprecated.Returns an iterator over all terms in this atom set.termsIterator(Term.Type type) Deprecated.Methods inherited from class AbstractInMemoryAtomSet
addAll, addAll, constantsIterator, contains, getConstants, getLiterals, getVariables, isSubSetOf, literalsIterator, match, removeAll, removeAll, toArray, variablesIteratorMethods inherited from class AbstractAtomSet
addAll, addAll, equals, equals, removeAll, removeAll, toStringMethods inherited from class Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AtomSet
addAll, addAll, atomsByTerm, containsTerm, match, removeAll, removeAllMethods inherited from interface InMemoryAtomSet
addAll, addAll, constantsIterator, contains, getConstants, getLiterals, getVariables, isSubSetOf, literalsIterator, parallelStream, removeAll, removeAll, spliterator, stream, toArray, variablesIterator
-
Constructor Details
-
LinkedListAtomSet
public LinkedListAtomSet()Deprecated.Creates an empty linked-list-based atom set. -
LinkedListAtomSet
Deprecated.Creates an atom set backed by the given linked list.- Parameters:
list- the backing list
-
LinkedListAtomSet
Deprecated.Creates an atom set initialized with the given atoms.- Parameters:
atoms- the atoms to add initially
-
LinkedListAtomSet
Deprecated.Creates an atom set by consuming the given iterator.- Parameters:
it- the iterator providing atoms- Throws:
IteratorException- if the iterator fails
-
LinkedListAtomSet
Deprecated.Creates an atom set by consuming the given iterator.- Parameters:
it- the iterator providing atoms
-
LinkedListAtomSet
Deprecated.copy constructor- Parameters:
atomset- the atom set to copy- Throws:
IteratorException- if iterating over the source atom set fails
-
LinkedListAtomSet
Deprecated.copy constructor- Parameters:
atomset- the atom set to copy
-
-
Method Details
-
match
Deprecated.Description copied from interface:AtomSetReturns an iterator over atoms that match predicate and constants from the specified atom.- Specified by:
matchin interfaceAtomSet- Specified by:
matchin interfaceInMemoryAtomSet- Parameters:
atom- the atom pattern to matchs- a substitution of Variable from atom into Term from this atom set.- Returns:
- an iterator over atoms.
-
atomsByPredicate
Deprecated.Description copied from interface:AtomSetReturns an iterator over all atoms with the specified predicate.- Specified by:
atomsByPredicatein interfaceAtomSet- Specified by:
atomsByPredicatein interfaceInMemoryAtomSet- Parameters:
p- the predicate to search for- Returns:
- an iterator over all atoms with the specified predicate.
-
termsByPredicatePosition
Deprecated.Description copied from interface:AtomSetReturns an iterator over terms which are in a specific position in at least one atom with the specified predicate.- Specified by:
termsByPredicatePositionin interfaceAtomSet- Specified by:
termsByPredicatePositionin interfaceInMemoryAtomSet- Parameters:
p- the predicate to inspectposition- the term position in atoms, positions starts from 0.- Returns:
- an iterator over terms which appear in the specified position of the specified predicate.
-
getPredicates
Deprecated.Description copied from interface:AtomSetReturns a Set of all predicates in this atom set.- Specified by:
getPredicatesin interfaceAtomSet- Specified by:
getPredicatesin interfaceInMemoryAtomSet- Overrides:
getPredicatesin classAbstractInMemoryAtomSet- Returns:
- a Set of all predicates.
-
predicatesIterator
Deprecated.Description copied from interface:AtomSetReturns an iterator over all predicates in this atom set. Each predicate is iterated only once time.- Specified by:
predicatesIteratorin interfaceAtomSet- Specified by:
predicatesIteratorin interfaceInMemoryAtomSet- Returns:
- an iterator over all predicates.
-
add
Deprecated.Description copied from interface:AtomSetAdd the specified atom to this atom set if is not already present.- Specified by:
addin interfaceAtomSet- Specified by:
addin interfaceInMemoryAtomSet- Parameters:
atom- the atom to be added to this atom set- Returns:
- true if this atom set did not already contain the specified atom
-
getTerms
Deprecated.Description copied from interface:AtomSetReturns a Set of all terms in this atom set.- Specified by:
getTermsin interfaceAtomSet- Specified by:
getTermsin interfaceInMemoryAtomSet- Overrides:
getTermsin classAbstractInMemoryAtomSet- Returns:
- a Set of all terms.
-
getFreshSymbolGenerator
Deprecated.Description copied from interface:AtomSetReturns the fresh symbol generator associated with this atom set.- Specified by:
getFreshSymbolGeneratorin interfaceAtomSet- Returns:
- the symbol generator used by this atom set
-
termsIterator
Deprecated.Description copied from interface:AtomSetReturns an iterator over all terms in this atom set. Each term is iterated only once time.- Specified by:
termsIteratorin interfaceAtomSet- Specified by:
termsIteratorin interfaceInMemoryAtomSet- Returns:
- an iterator over all terms.
-
getTerms
Deprecated.Description copied from interface:AtomSetThis method is deprecated since 1.3, useAtomSet.getVariables(),AtomSet.getConstants()orAtomSet.getLiterals()instead.
Returns a Set of all terms of the specified type in this atom set.- Specified by:
getTermsin interfaceAtomSet- Specified by:
getTermsin interfaceInMemoryAtomSet- Overrides:
getTermsin classAbstractInMemoryAtomSet- Parameters:
type- the term type to filter on- Returns:
- a collection of all terms of the specified type in this atom set.
-
termsIterator
Deprecated.Description copied from interface:AtomSetThis method is deprecated since 1.3, useAtomSet.variablesIterator(),AtomSet.constantsIterator()orAtomSet.literalsIterator()instead.
Returns an iterator of all terms of the specified type in this atom set. Each term is iterated only once time.- Specified by:
termsIteratorin interfaceAtomSet- Specified by:
termsIteratorin interfaceInMemoryAtomSet- Parameters:
type- the term type to filter on- Returns:
- an iterator of all terms.
-
remove
Deprecated.Description copied from interface:AtomSetRemove the specified atom from this this atom set.- Specified by:
removein interfaceAtomSet- Specified by:
removein interfaceInMemoryAtomSet- Overrides:
removein classAbstractInMemoryAtomSet- Parameters:
atom- the atom to be removed- Returns:
- true if this atom set contained the specified atom.
-
removeWithoutCheck
Deprecated.Description copied from interface:AtomSetRemove the specified atom from this this atom set.- Specified by:
removeWithoutCheckin interfaceAtomSet- Specified by:
removeWithoutCheckin interfaceInMemoryAtomSet- Parameters:
atom- the atom to be removed
-
iterator
Deprecated.Description copied from interface:AtomSetReturns an iterator over the atoms in this atom set.- Specified by:
iteratorin interfaceAtomSet- Specified by:
iteratorin interfaceCloseableIterable<Atom>- Specified by:
iteratorin interfaceCloseableIterableWithoutException<Atom>- Specified by:
iteratorin interfaceInMemoryAtomSet- Specified by:
iteratorin interfaceIterable<Atom>- Returns:
- an iterator over the atoms in this atom set.
-
isEmpty
public boolean isEmpty()Deprecated.Description copied from interface:AtomSetReturns whether this atom set contains no atom.- Specified by:
isEmptyin interfaceAtomSet- Specified by:
isEmptyin interfaceInMemoryAtomSet- Overrides:
isEmptyin classAbstractInMemoryAtomSet- Returns:
- true if this atom set is empty, false otherwise.
-
size
public int size()Deprecated.Description copied from class:AbstractAtomSetThis default implementation should be overriden, it is convenient for in memory set, but will be inefficient in some case.- Specified by:
sizein interfaceAtomSet- Specified by:
sizein interfaceInMemoryAtomSet- Overrides:
sizein classAbstractInMemoryAtomSet- Returns:
- the number of atoms in the set
- See Also:
-
clear
public void clear()Deprecated.Description copied from interface:AtomSetRemoves all atoms from this atom set.- Specified by:
clearin interfaceAtomSet- Specified by:
clearin interfaceInMemoryAtomSet
-