Package org.apache.calcite.util.mapping
Interface Mappings.FunctionMapping
- All Superinterfaces:
Iterable<IntPair>
,Mappings.CoreMapping
- All Known Subinterfaces:
Mapping
,Mappings.TargetMapping
- All Known Implementing Classes:
AbstractSourceMapping
,AbstractTargetMapping
,Mappings.AbstractMapping
,Mappings.FiniteAbstractMapping
,Mappings.IdentityMapping
,Mappings.OverridingSourceMapping
,Mappings.OverridingTargetMapping
,Mappings.PartialMapping
,Permutation
- Enclosing class:
Mappings
Mapping where every source has a target. But:
- A target may not have a source.
- May not be finite.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the mapping type.int
int
getTarget
(int source) Returns the target that a source maps to.int
getTargetOpt
(int source) Returns the target that a source maps to, or -1 if it is not mapped.Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface org.apache.calcite.util.mapping.Mappings.CoreMapping
size
-
Method Details
-
getTargetOpt
int getTargetOpt(int source) Returns the target that a source maps to, or -1 if it is not mapped. -
getTarget
int getTarget(int source) Returns the target that a source maps to.- Parameters:
source
- source- Returns:
- target
- Throws:
Mappings.NoElementException
- if source is not mapped
-
getMappingType
MappingType getMappingType()Description copied from interface:Mappings.CoreMapping
Returns the mapping type.- Specified by:
getMappingType
in interfaceMappings.CoreMapping
- Returns:
- Mapping type
-
getSourceCount
int getSourceCount()
-