Class Mappings.IdentityMapping

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private int size  
    • Constructor Summary

      Constructors 
      Constructor Description
      IdentityMapping​(int size)
      Creates an identity mapping.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clear()
      Removes all elements in the mapping.
      MappingType getMappingType()
      Returns the mapping type.
      int getSource​(int target)  
      int getSourceCount()
      Returns the number of sources.
      int getSourceOpt​(int target)  
      int getTarget​(int source)
      Returns the target that a source maps to.
      int getTargetCount()
      Returns the number of targets.
      int getTargetOpt​(int source)
      Returns the target that a source maps to, or -1 if it is not mapped.
      Mapping inverse()  
      boolean isIdentity()
      Returns whether this mapping is the identity.
      java.util.Iterator<IntPair> iterator()
      Returns an iterator over the elements in this mapping.
      void set​(int source, int target)  
      int size()
      Returns the number of elements in the mapping.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator