@ApiAudience.Public @ApiStability.Unstable public class Hash extends java.lang.Object implements Adaptor, Encodable
Modifier and Type | Field and Description |
---|---|
protected BytesValue |
bytesValue |
Constructor and Description |
---|
Hash(BytesValue bytesValue)
Hash constructor.
|
Hash(java.lang.String encoded)
Hash constructor.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
adapt(java.lang.Class<T> adaptor)
Convert to other resource.
|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getEncoded()
Get encoded value.
|
int |
hashCode() |
static Hash |
of(BytesValue bytesValue)
Create
Hash . |
static Hash |
of(java.lang.String encoded)
Create
Hash with a base58 encoded value. |
java.lang.String |
toString() |
protected final BytesValue bytesValue
@ApiAudience.Public public Hash(java.lang.String encoded)
encoded
- String with base58 encodedDecodingFailureException
- if decoding failed@ApiAudience.Private public Hash(BytesValue bytesValue)
bytesValue
- an bytes value@ApiAudience.Public public static Hash of(java.lang.String encoded)
Hash
with a base58 encoded value.encoded
- String with base58 encodedHash
DecodingFailureException
- if decoding failed@ApiAudience.Private public static Hash of(BytesValue bytesValue)
Hash
.bytesValue
- BytesValue
Hash
public java.lang.String getEncoded()
Encodable
getEncoded
in interface Encodable
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public <T> T adapt(java.lang.Class<T> adaptor)
Adaptor