java.lang.Object
org.springframework.boot.buildpack.platform.docker.type.LayerId

public final class LayerId extends Object
A layer ID as used inside a Docker image of the form algorithm: hash.
Since:
2.3.0
Author:
Phillip Webb
  • Method Details

    • getAlgorithm

      public String getAlgorithm()
      Return the algorithm of layer.
      Returns:
      the algorithm
    • getHash

      public String getHash()
      Return the hash of the layer.
      Returns:
      the layer hash
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • of

      public static LayerId of(String value)
      Create a new LayerId with the specified value.
      Parameters:
      value - the layer ID value of the form algorithm: hash
      Returns:
      a new layer ID instance
    • ofSha256Digest

      public static LayerId ofSha256Digest(byte[] digest)
      Create a new LayerId from a SHA-256 digest.
      Parameters:
      digest - the digest
      Returns:
      a new layer ID instance