Interface Structure1D.IndexMapper<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default T next​(T key)
      This default implementation assumes that the index is incremented by 1 when incrementing the key to the next value.
      default T previous​(T key)
      This default implementation assumes that the index is decremented by 1 when decrementing the key to the previous value.
      long toIndex​(T key)
      For each key (any instance of that type) there is a corresponding index value – 1 or more key instances will be mapped to each index value.
      T toKey​(long index)
      In most cases it should be safe to assume that the input index value is valid (matching what would be created by toIndex(Object)).
    • Method Detail

      • next

        default T next​(T key)
        This default implementation assumes that the index is incremented by 1 when incrementing the key to the next value.
        Parameters:
        key - The value to increment
        Returns:
        The next (incremented) value
      • previous

        default T previous​(T key)
        This default implementation assumes that the index is decremented by 1 when decrementing the key to the previous value.
        Parameters:
        key - The value to decrement
        Returns:
        The previous (decremented) value
      • toIndex

        long toIndex​(T key)
        For each key (any instance of that type) there is a corresponding index value – 1 or more key instances will be mapped to each index value.
      • toKey

        T toKey​(long index)
        In most cases it should be safe to assume that the input index value is valid (matching what would be created by toIndex(Object)).