Interface DirectionRelativeDataHolder

    • Method Detail

      • get

        <E> java.util.Optional<E> get​(Direction direction,
                                      Key<? extends Value<E>> key)
        Attempts to get the underlying value backed by a Value linked to the provided Key and Direction. If the Key is not supported, Optional.empty() is returned. It is important to check for support of a Key by either calling ValueContainer.supports(Value) or ValueContainer.supports(Key).
        Type Parameters:
        E - The type of value
        Parameters:
        direction - The direction
        key - The key to retrieve the value for
        Returns:
        The value, if available
      • getInt

        default java.util.OptionalInt getInt​(Direction direction,
                                             Key<? extends Value<java.lang.Integer>> key)
        Attempts to get the underlying int value backed by a Value linked to the provided Key and Direction. If the Key is not supported, Optional.empty() is returned. It is important to check for support of a Key by either calling ValueContainer.supports(Value) or ValueContainer.supports(Key).
        Parameters:
        direction - The direction
        key - The key to retrieve the value for
        Returns:
        The value, if available
      • getDouble

        default java.util.OptionalDouble getDouble​(Direction direction,
                                                   Key<? extends Value<java.lang.Double>> key)
        Attempts to get the underlying double value backed by a Value linked to the provided Key and Direction. If the Key is not supported, Optional.empty() is returned. It is important to check for support of a Key by either calling ValueContainer.supports(Value) or ValueContainer.supports(Key).
        Parameters:
        direction - The direction
        key - The key to retrieve the value for
        Returns:
        The value, if available
      • getLong

        default java.util.OptionalLong getLong​(Direction direction,
                                               Key<? extends Value<java.lang.Long>> key)
        Attempts to get the underlying long value backed by a Value linked to the provided Key and Direction. If the Key is not supported, Optional.empty() is returned. It is important to check for support of a Key by either calling ValueContainer.supports(Value) or ValueContainer.supports(Key).
        Parameters:
        direction - The direction
        key - The key to retrieve the value for
        Returns:
        The value, if available