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 Summary
Modifier 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.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.apache.calcite.util.mapping.Mappings.CoreMapping
sizeMethods inherited from interface org.apache.calcite.util.mapping.Mappings.FunctionMapping
getMappingType 
- 
Method Details
- 
getSourceCount
int getSourceCount()- Specified by:
 getSourceCountin interfaceMappings.FunctionMapping
 - 
getSourceOpt
int getSourceOpt(int target) Returns the source that a target maps to, or -1 if it is not mapped. - 
getTargetCount
int getTargetCount() - 
getTarget
int getTarget(int source) Returns the target that a source maps to.- Specified by:
 getTargetin interfaceMappings.FunctionMapping- Parameters:
 source- source- Returns:
 - target
 - Throws:
 Mappings.NoElementException- if source is not mapped
 - 
getTargetOpt
int getTargetOpt(int source) Returns the target that a source maps to, or -1 if it is not mapped.- Specified by:
 getTargetOptin interfaceMappings.FunctionMapping
 - 
set
void set(int source, int target)  - 
inverse
Mapping inverse() 
 -