Class AlignmentTools.IdentityMap<K>

  • Type Parameters:
    K -
    All Implemented Interfaces:
    Map<K,​K>
    Enclosing class:
    AlignmentTools

    public static class AlignmentTools.IdentityMap<K>
    extends AbstractMap<K,​K>
    A Map can be viewed as a function from K to V. This class represents the identity function. Getting a value results in the value itself.

    The class is a bit inconsistent when representing its contents. On the one hand, containsKey(key) is true for all objects. However, attempting to iterate through the values returns an empty set.

    Author:
    Spencer Bliven