Class AbstractImmutableAtomSet
java.lang.Object
fr.lirmm.graphik.integraal.core.atomset.AbstractAtomSet
fr.lirmm.graphik.integraal.core.atomset.AbstractImmutableAtomSet
- All Implemented Interfaces:
AtomSet, CloseableIterable<Atom>
Base implementation for immutable atom sets.
- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an abstract immutable atom set base implementation. -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdd the specified atom to this atom set if is not already present.booleanAdds all atoms from the specified atom set.booleanaddAll(CloseableIterator<? extends Atom> atoms) Add the specified atom stream to this atom set.voidclear()Removes all atoms from this atom set.booleanRemove the specified atom from this this atom set.booleanRemoves all atoms contained in the specified atom set.booleanremoveAll(CloseableIterator<? extends Atom> atoms) Remove the specified atom stream from this atom set.Methods inherited from class AbstractAtomSet
constantsIterator, contains, equals, equals, getConstants, getLiterals, getPredicates, getTerms, getTerms, getVariables, isEmpty, isSubSetOf, literalsIterator, match, size, toString, variablesIteratorMethods inherited from class Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AtomSet
atomsByPredicate, atomsByTerm, containsTerm, getFreshSymbolGenerator, iterator, match, predicatesIterator, removeWithoutCheck, termsByPredicatePosition, termsIterator, termsIterator
-
Constructor Details
-
AbstractImmutableAtomSet
protected AbstractImmutableAtomSet()Creates an abstract immutable atom set base implementation.
-
-
Method Details
-
add
Description copied from interface:AtomSetAdd the specified atom to this atom set if is not already present.- Parameters:
atom- the atom to be added to this atom set- Returns:
- true if this atom set did not already contain the specified atom
- Throws:
AtomSetException- if the atom cannot be added
-
addAll
Description copied from interface:AtomSetAdd the specified atom stream to this atom set.- Specified by:
addAllin interfaceAtomSet- Overrides:
addAllin classAbstractAtomSet- Parameters:
atoms- the atom stream to add- Returns:
- true if this atomset changed as a result of the call.
- Throws:
AtomSetException- if the atoms cannot be added
-
addAll
Description copied from interface:AtomSetAdds all atoms from the specified atom set.- Specified by:
addAllin interfaceAtomSet- Overrides:
addAllin classAbstractAtomSet- Parameters:
atoms- the atom set to add- Returns:
- true if this atomset changed as a result of the call.
- Throws:
AtomSetException- if the atoms cannot be added
-
remove
Description copied from interface:AtomSetRemove the specified atom from this this atom set.- Specified by:
removein interfaceAtomSet- Overrides:
removein classAbstractAtomSet- Parameters:
atom- the atom to be removed- Returns:
- true if this atom set contained the specified atom.
- Throws:
AtomSetException- if the atom cannot be removed
-
removeAll
Description copied from interface:AtomSetRemove the specified atom stream from this atom set.- Specified by:
removeAllin interfaceAtomSet- Overrides:
removeAllin classAbstractAtomSet- Parameters:
atoms- the atom stream to be removed- Returns:
- true if this atomset changed as a result of the call. In many implementations, the return value is only true since it's time consuming to test the effective modification of the store (e.g. RDBMS, RDF4J...)
- Throws:
AtomSetException- if the atoms cannot be removed
-
removeAll
Description copied from interface:AtomSetRemoves all atoms contained in the specified atom set.- Specified by:
removeAllin interfaceAtomSet- Overrides:
removeAllin classAbstractAtomSet- Parameters:
atoms- the atoms to remove- Returns:
- true if this atom set changed as a result of the call
- Throws:
AtomSetException- if the atoms cannot be removed
-
clear
Description copied from interface:AtomSetRemoves all atoms from this atom set.- Throws:
AtomSetException- if the set cannot be cleared
-