Class WrappingSolutionMappingsIndex
java.lang.Object
se.liu.ida.hefquin.base.datastructures.impl.WrappingSolutionMappingsIndex
- All Implemented Interfaces:
Iterable<SolutionMapping>,Collection<SolutionMapping>,SolutionMappingsIndex,StatsProvider
- Direct Known Subclasses:
SolutionMappingsIndexForMixedUsage,SolutionMappingsIndexWithPostMatching
Base class for implementations of
SolutionMappingsIndex
that wrap another SolutionMappingsIndex. This base class
simply forwards all method calls to the wrapped index. Subclasses
may override this behavior for selected methods.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanaddAll(Collection<? extends SolutionMapping> c) voidclear()booleanbooleancontainsAll(Collection<?> c) findSolutionMappings(org.apache.jena.sparql.core.Var var, org.apache.jena.graph.Node value) Returns an iterator over all solution mappings in this index that map the given variable to the given value.findSolutionMappings(org.apache.jena.sparql.core.Var var1, org.apache.jena.graph.Node value1, org.apache.jena.sparql.core.Var var2, org.apache.jena.graph.Node value2) Returns an iterator over all solution mappings in this index that map the first variable to the first value and the second variable to the second value.findSolutionMappings(org.apache.jena.sparql.core.Var var1, org.apache.jena.graph.Node value1, org.apache.jena.sparql.core.Var var2, org.apache.jena.graph.Node value2, org.apache.jena.sparql.core.Var var3, org.apache.jena.graph.Node value3) This method is a three-variables version of the methodSolutionMappingsIndex.findSolutionMappings(Var, Node).Returns all solution mappings currently in this index.Returns an iterator over all solution mappings in this index that are compatible with the given solution mappings.getStats()booleanisEmpty()booleanbooleanremoveAll(Collection<?> c) voidbooleanretainAll(Collection<?> c) intsize()Object[]toArray()<T> T[]toArray(T[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArrayMethods inherited from interface se.liu.ida.hefquin.base.datastructures.SolutionMappingsIndex
iterator
-
Field Details
-
wrappedIndex
-
-
Constructor Details
-
WrappingSolutionMappingsIndex
-
-
Method Details
-
getStats
- Specified by:
getStatsin interfaceStatsProvider
-
resetStats
public void resetStats()- Specified by:
resetStatsin interfaceStatsProvider
-
size
public int size()- Specified by:
sizein interfaceCollection<SolutionMapping>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<SolutionMapping>
-
contains
- Specified by:
containsin interfaceCollection<SolutionMapping>
-
toArray
- Specified by:
toArrayin interfaceCollection<SolutionMapping>
-
toArray
public <T> T[] toArray(T[] a) - Specified by:
toArrayin interfaceCollection<SolutionMapping>
-
add
- Specified by:
addin interfaceCollection<SolutionMapping>
-
remove
- Specified by:
removein interfaceCollection<SolutionMapping>
-
containsAll
- Specified by:
containsAllin interfaceCollection<SolutionMapping>
-
addAll
- Specified by:
addAllin interfaceCollection<SolutionMapping>
-
removeAll
- Specified by:
removeAllin interfaceCollection<SolutionMapping>
-
retainAll
- Specified by:
retainAllin interfaceCollection<SolutionMapping>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<SolutionMapping>
-
getJoinPartners
public Iterable<SolutionMapping> getJoinPartners(SolutionMapping sm) throws UnsupportedOperationException Description copied from interface:SolutionMappingsIndexReturns an iterator over all solution mappings in this index that are compatible with the given solution mappings. Implementations may choose to support this method only for specific types of solution mappings (e.g., with specific variables), in which case anUnsupportedOperationExceptionwill be thrown if the method is called with an unsupported variable.- Specified by:
getJoinPartnersin interfaceSolutionMappingsIndex- Throws:
UnsupportedOperationException
-
findSolutionMappings
public Iterable<SolutionMapping> findSolutionMappings(org.apache.jena.sparql.core.Var var, org.apache.jena.graph.Node value) throws UnsupportedOperationException Description copied from interface:SolutionMappingsIndexReturns an iterator over all solution mappings in this index that map the given variable to the given value. Implementations may choose to support this method only for specific variables, in which case anUnsupportedOperationExceptionwill be thrown if the method is called with an unsupported variable. The result of this method should essentially be the same as the result of callingSolutionMappingsIndex.getJoinPartners(SolutionMapping)with a solution mapping that is defined only for the given variable and that maps this variable to the given value.- Specified by:
findSolutionMappingsin interfaceSolutionMappingsIndex- Throws:
UnsupportedOperationException
-
findSolutionMappings
public Iterable<SolutionMapping> findSolutionMappings(org.apache.jena.sparql.core.Var var1, org.apache.jena.graph.Node value1, org.apache.jena.sparql.core.Var var2, org.apache.jena.graph.Node value2) throws UnsupportedOperationException Description copied from interface:SolutionMappingsIndexReturns an iterator over all solution mappings in this index that map the first variable to the first value and the second variable to the second value. Hence, this method is a two-variables version of the methodSolutionMappingsIndex.findSolutionMappings(Var, Node).- Specified by:
findSolutionMappingsin interfaceSolutionMappingsIndex- Throws:
UnsupportedOperationException
-
findSolutionMappings
public Iterable<SolutionMapping> findSolutionMappings(org.apache.jena.sparql.core.Var var1, org.apache.jena.graph.Node value1, org.apache.jena.sparql.core.Var var2, org.apache.jena.graph.Node value2, org.apache.jena.sparql.core.Var var3, org.apache.jena.graph.Node value3) throws UnsupportedOperationException Description copied from interface:SolutionMappingsIndexThis method is a three-variables version of the methodSolutionMappingsIndex.findSolutionMappings(Var, Node).- Specified by:
findSolutionMappingsin interfaceSolutionMappingsIndex- Throws:
UnsupportedOperationException
-
getAllSolutionMappings
Description copied from interface:SolutionMappingsIndexReturns all solution mappings currently in this index.- Specified by:
getAllSolutionMappingsin interfaceSolutionMappingsIndex
-