Interface WithHash<T>

Type Parameters:
T - The underlying value that will be returned.

@Immutable public interface WithHash<T>
A wrapper class that allows a value to be returned with an associated hash (a concrete ref).
  • Method Summary

    Modifier and Type
    Method
    Description
    Get the value of the hash associated with this commit.
    Get the value this object wraps.
    static <T> WithHash<T>
    of(Hash hash, T value)
    Build a WithHash object of type T.
  • Method Details

    • getHash

      Hash getHash()
      Get the value of the hash associated with this commit.
    • getValue

      T getValue()
      Get the value this object wraps.
    • of

      static <T> WithHash<T> of(Hash hash, T value)
      Build a WithHash object of type T.
      Type Parameters:
      T - The value type to hold
      Parameters:
      hash - The hash this value type is connected to.
      value - The value held.
      Returns:
      A new WithHash object.