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

public static interface Mappings.FunctionMapping extends Mappings.CoreMapping
Mapping where every source has a target. But:
  • A target may not have a source.
  • May not be finite.
  • 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 interface Mappings.CoreMapping
      Returns:
      Mapping type
    • getSourceCount

      int getSourceCount()