org.eigenbase.util.mapping
Class Mappings.OverridingSourceMapping

java.lang.Object
  extended by org.eigenbase.util.mapping.Mappings.AbstractMapping
      extended by org.eigenbase.util.mapping.Mappings.OverridingSourceMapping
All Implemented Interfaces:
Iterable<IntPair>, Mapping, Mappings.FunctionMapping, Mappings.SourceMapping, Mappings.TargetMapping
Enclosing class:
Mappings

public static class Mappings.OverridingSourceMapping
extends Mappings.AbstractMapping
implements Mappings.SourceMapping


Field Summary
private  Mappings.SourceMapping parent
           
private  int source
           
private  int target
           
 
Constructor Summary
Mappings.OverridingSourceMapping(Mappings.SourceMapping parent, int source, int target)
           
 
Method Summary
 MappingType getMappingType()
           
 int getSource(int target)
           
 Mapping inverse()
           
 boolean isIdentity()
          Returns whether this mapping is the identity.
 Iterator<IntPair> iterator()
          Returns an iterator over the elements in this mapping.
 
Methods inherited from class org.eigenbase.util.mapping.Mappings.AbstractMapping
getSourceCount, getSourceOpt, getTarget, getTargetCount, getTargetOpt, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eigenbase.util.mapping.Mappings.SourceMapping
getSourceCount, getSourceOpt, getTargetCount, getTargetOpt
 

Field Detail

parent

private final Mappings.SourceMapping parent

source

private final int source

target

private final int target
Constructor Detail

Mappings.OverridingSourceMapping

public Mappings.OverridingSourceMapping(Mappings.SourceMapping parent,
                                        int source,
                                        int target)
Method Detail

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

getSource

public int getSource(int target)
Specified by:
getSource in interface Mappings.SourceMapping
Overrides:
getSource in class Mappings.AbstractMapping

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

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