Package org.apache.calcite.util.mapping
Interface Mappings.TargetMapping
- All Superinterfaces:
- Iterable<IntPair>,- Mappings.CoreMapping,- Mappings.FunctionMapping
- All Known Subinterfaces:
- Mapping
- All Known Implementing Classes:
- AbstractSourceMapping,- AbstractTargetMapping,- Mappings.AbstractMapping,- Mappings.FiniteAbstractMapping,- Mappings.IdentityMapping,- Mappings.OverridingSourceMapping,- Mappings.OverridingTargetMapping,- Mappings.PartialMapping,- Permutation
- Enclosing class:
- Mappings
Mapping suitable for mapping columns to a target.
 
Properties:
- It has a finite number of sources and targets
- Each target has at most one source
- Each source has exactly one target
TODO: figure out which interfaces this should extend
- 
Method SummaryModifier and TypeMethodDescriptionintintgetSourceOpt(int target) Returns the source that a target maps to, or -1 if it is not mapped.intgetTarget(int source) Returns the target that a source maps to.intintgetTargetOpt(int source) Returns the target that a source maps to, or -1 if it is not mapped.inverse()voidset(int source, int target) Methods inherited from interface java.lang.IterableforEach, iterator, spliteratorMethods inherited from interface org.apache.calcite.util.mapping.Mappings.CoreMappingsizeMethods inherited from interface org.apache.calcite.util.mapping.Mappings.FunctionMappinggetMappingType
- 
Method Details- 
getSourceCountint getSourceCount()- Specified by:
- getSourceCountin interface- Mappings.FunctionMapping
 
- 
getSourceOptint getSourceOpt(int target) Returns the source that a target maps to, or -1 if it is not mapped.
- 
getTargetCountint getTargetCount()
- 
getTargetint getTarget(int source) Returns the target that a source maps to.- Specified by:
- getTargetin interface- Mappings.FunctionMapping
- Parameters:
- source- source
- Returns:
- target
- Throws:
- Mappings.NoElementException- if source is not mapped
 
- 
getTargetOptint getTargetOpt(int source) Returns the target that a source maps to, or -1 if it is not mapped.- Specified by:
- getTargetOptin interface- Mappings.FunctionMapping
 
- 
setvoid set(int source, int target) 
- 
inverseMapping inverse()
 
-