Package org.apache.calcite.util.mapping
Class Mappings.OverridingTargetMapping
java.lang.Object
org.apache.calcite.util.mapping.Mappings.AbstractMapping
org.apache.calcite.util.mapping.Mappings.OverridingTargetMapping
- All Implemented Interfaces:
- Iterable<IntPair>,- Mapping,- Mappings.CoreMapping,- Mappings.FunctionMapping,- Mappings.SourceMapping,- Mappings.TargetMapping
- Enclosing class:
- Mappings
public static class Mappings.OverridingTargetMapping
extends Mappings.AbstractMapping
implements Mappings.TargetMapping
Target mapping that returns the same result as a parent
 
Mappings.TargetMapping except for specific overriding elements.- 
Constructor SummaryConstructorsConstructorDescriptionOverridingTargetMapping(Mappings.TargetMapping parent, int target, int source) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidclear()Removes all elements in the mapping.Returns the mapping type.intgetTarget(int source) Returns the target that a source maps to.inverse()booleanReturns whether this mapping is the identity.iterator()Returns an iterator over the elements in this mapping.voidset(int source, int target) intsize()Returns the number of elements in the mapping.Methods inherited from class org.apache.calcite.util.mapping.Mappings.AbstractMappinggetSource, getSourceCount, getSourceOpt, getTargetCount, getTargetOpt, toStringMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.apache.calcite.util.mapping.Mappings.TargetMappinggetSourceCount, getSourceOpt, getTargetCount, getTargetOpt
- 
Constructor Details- 
OverridingTargetMapping
 
- 
- 
Method Details- 
clearpublic void clear()Description copied from interface:MappingRemoves all elements in the mapping.
- 
sizepublic int size()Description copied from interface:Mappings.CoreMappingReturns the number of elements in the mapping.- Specified by:
- sizein interface- Mapping
- Specified by:
- sizein interface- Mappings.CoreMapping
 
- 
setpublic void set(int source, int target) - Specified by:
- setin interface- Mappings.TargetMapping
- Overrides:
- setin class- Mappings.AbstractMapping
 
- 
inverse- Specified by:
- inversein interface- Mappings.SourceMapping
- Specified by:
- inversein interface- Mappings.TargetMapping
 
- 
getMappingTypeDescription copied from interface:Mappings.CoreMappingReturns the mapping type.- Specified by:
- getMappingTypein interface- Mapping
- Specified by:
- getMappingTypein interface- Mappings.CoreMapping
- Specified by:
- getMappingTypein interface- Mappings.FunctionMapping
- Specified by:
- getMappingTypein interface- Mappings.SourceMapping
- Returns:
- Mapping type
 
- 
isIdentitypublic boolean isIdentity()Description copied from interface:MappingReturns whether this mapping is the identity.- Specified by:
- isIdentityin interface- Mapping
- Specified by:
- isIdentityin interface- Mappings.SourceMapping
- Overrides:
- isIdentityin class- Mappings.AbstractMapping
 
- 
getTargetpublic int getTarget(int source) Description copied from interface:Mappings.FunctionMappingReturns the target that a source maps to.- Specified by:
- getTargetin interface- Mappings.FunctionMapping
- Specified by:
- getTargetin interface- Mappings.TargetMapping
- Overrides:
- getTargetin class- Mappings.AbstractMapping
- Parameters:
- source- source
- Returns:
- target
 
- 
iteratorDescription copied from interface:MappingReturns an iterator over the elements in this mapping.This method is optional; implementations may throw UnsupportedOperationException.
 
-