Interface Mappings.TargetMapping

All Superinterfaces:
Iterable<IntPair>, Mappings.CoreMapping, Mappings.FunctionMapping
All Known Subinterfaces:
All Known Implementing Classes:
AbstractSourceMapping, AbstractTargetMapping, Mappings.AbstractMapping, Mappings.FiniteAbstractMapping, Mappings.IdentityMapping, Mappings.OverridingSourceMapping, Mappings.OverridingTargetMapping, Mappings.PartialMapping, Permutation
Enclosing class:

public static interface Mappings.TargetMapping extends Mappings.FunctionMapping
Mapping suitable for mapping columns to a target.


  • 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 Details

    • getSourceCount

      int getSourceCount()
      Specified by:
      getSourceCount in interface Mappings.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:
      getTarget in interface Mappings.FunctionMapping
      source - source
      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:
      getTargetOpt in interface Mappings.FunctionMapping
    • set

      void set(int source, int target)
    • inverse

      Mapping inverse()