Package org.apache.calcite.util.mapping
Class Mappings.OverridingSourceMapping
java.lang.Object
org.apache.calcite.util.mapping.Mappings.AbstractMapping
org.apache.calcite.util.mapping.Mappings.OverridingSourceMapping
- All Implemented Interfaces:
Iterable<IntPair>,Mapping,Mappings.CoreMapping,Mappings.FunctionMapping,Mappings.SourceMapping,Mappings.TargetMapping
- Enclosing class:
Mappings
public static class Mappings.OverridingSourceMapping
extends Mappings.AbstractMapping
implements Mappings.SourceMapping
Source mapping that returns the same result as a parent
Mappings.SourceMapping except for specific overriding elements.-
Constructor Summary
ConstructorsConstructorDescriptionOverridingSourceMapping(Mappings.SourceMapping parent, int source, int target) -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all elements in the mapping.Returns the mapping type.intgetSource(int target) Returns the source that a target maps to.inverse()booleanReturns whether this mapping is the identity.iterator()Returns an iterator over the elements in this mapping.intsize()Returns the number of elements in the mapping.Methods inherited from class org.apache.calcite.util.mapping.Mappings.AbstractMapping
getSourceCount, getSourceOpt, getTarget, getTargetCount, getTargetOpt, set, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.apache.calcite.util.mapping.Mappings.SourceMapping
getSourceOpt, getTargetOpt
-
Constructor Details
-
OverridingSourceMapping
-
-
Method Details
-
clear
public void clear()Description copied from interface:MappingRemoves all elements in the mapping. -
size
public int size()Description copied from interface:Mappings.CoreMappingReturns the number of elements in the mapping.- Specified by:
sizein interfaceMapping- Specified by:
sizein interfaceMappings.CoreMapping
-
inverse
- Specified by:
inversein interfaceMappings.SourceMapping- Specified by:
inversein interfaceMappings.TargetMapping
-
getMappingType
Description copied from interface:Mappings.CoreMappingReturns the mapping type.- Specified by:
getMappingTypein interfaceMapping- Specified by:
getMappingTypein interfaceMappings.CoreMapping- Specified by:
getMappingTypein interfaceMappings.FunctionMapping- Specified by:
getMappingTypein interfaceMappings.SourceMapping- Returns:
- Mapping type
-
getSource
public int getSource(int target) Description copied from interface:Mappings.SourceMappingReturns the source that a target maps to.- Specified by:
getSourcein interfaceMappings.SourceMapping- Overrides:
getSourcein classMappings.AbstractMapping- Parameters:
target- target- Returns:
- source
-
isIdentity
public boolean isIdentity()Description copied from interface:MappingReturns whether this mapping is the identity.- Specified by:
isIdentityin interfaceMapping- Specified by:
isIdentityin interfaceMappings.SourceMapping- Overrides:
isIdentityin classMappings.AbstractMapping
-
iterator
Description copied from interface:MappingReturns an iterator over the elements in this mapping.This method is optional; implementations may throw
UnsupportedOperationException.
-