org.eigenbase.util.mapping
Class Mappings.OverridingTargetMapping
java.lang.Object
org.eigenbase.util.mapping.Mappings.AbstractMapping
org.eigenbase.util.mapping.Mappings.OverridingTargetMapping
- All Implemented Interfaces:
- Iterable<IntPair>, Mapping, Mappings.FunctionMapping, Mappings.SourceMapping, Mappings.TargetMapping
- Enclosing class:
- Mappings
public static class Mappings.OverridingTargetMapping
- extends Mappings.AbstractMapping
- implements Mappings.TargetMapping
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parent
private final Mappings.TargetMapping parent
target
private final int target
source
private final int source
Mappings.OverridingTargetMapping
public Mappings.OverridingTargetMapping(Mappings.TargetMapping parent,
int target,
int source)
set
public void set(int source,
int target)
- Specified by:
set
in interface Mappings.TargetMapping
- Overrides:
set
in class Mappings.AbstractMapping
inverse
public Mapping inverse()
- Specified by:
inverse
in interface Mappings.SourceMapping
- Specified by:
inverse
in interface Mappings.TargetMapping
getMappingType
public MappingType getMappingType()
- Specified by:
getMappingType
in interface Mapping
- Specified by:
getMappingType
in interface Mappings.FunctionMapping
- Specified by:
getMappingType
in interface Mappings.SourceMapping
- Specified by:
getMappingType
in interface Mappings.TargetMapping
isIdentity
public boolean isIdentity()
- Description copied from interface:
Mapping
- Returns whether this mapping is the identity.
- Specified by:
isIdentity
in interface Mapping
- Specified by:
isIdentity
in interface Mappings.SourceMapping
- Overrides:
isIdentity
in class Mappings.AbstractMapping
getTarget
public int getTarget(int source)
- Description copied from interface:
Mappings.FunctionMapping
- Returns the target that a source maps to.
- Specified by:
getTarget
in interface Mappings.FunctionMapping
- Specified by:
getTarget
in interface Mappings.TargetMapping
- Overrides:
getTarget
in class Mappings.AbstractMapping
- Parameters:
source
- source
- Returns:
- target
iterator
public Iterator<IntPair> iterator()
- Description copied from interface:
Mapping
- Returns an iterator over the elements in this mapping.
This method is optional; implementations may throw UnsupportedOperationException
.
- Specified by:
iterator
in interface Iterable<IntPair>
- Specified by:
iterator
in interface Mapping