Package com.io7m.coffeepick.api
Class CoffeePickVerification
java.lang.Object
com.io7m.coffeepick.api.CoffeePickVerification
- All Implemented Interfaces:
CoffeePickVerificationType
public final class CoffeePickVerification extends java.lang.Object implements CoffeePickVerificationType
A value indicating whether or not the verification of an inventory item succeeded.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CoffeePickVerification.Builder
Builds instances of typeCoffeePickVerification
. -
Method Summary
Modifier and Type Method Description static CoffeePickVerification.Builder
builder()
Creates a builder forCoffeePickVerification
.static CoffeePickVerification
copyOf(CoffeePickVerificationType instance)
Creates an immutable copy of aCoffeePickVerificationType
value.boolean
equals(java.lang.Object another)
This instance is equal to all instances ofCoffeePickVerification
that have equal attribute values.RuntimeHash
expectedHash()
int
hashCode()
Computes a hash code from attributes:expectedHash
,receivedHash
.RuntimeHash
receivedHash()
java.lang.String
toString()
Prints the immutable valueCoffeePickVerification
with attribute values.CoffeePickVerification
withExpectedHash(RuntimeHash value)
Copy the current immutable object by setting a value for theexpectedHash
attribute.CoffeePickVerification
withReceivedHash(RuntimeHash value)
Copy the current immutable object by setting a value for thereceivedHash
attribute.
-
Method Details
-
expectedHash
- Specified by:
expectedHash
in interfaceCoffeePickVerificationType
- Returns:
- The expected hash value
-
receivedHash
- Specified by:
receivedHash
in interfaceCoffeePickVerificationType
- Returns:
- The received hash value
-
withExpectedHash
Copy the current immutable object by setting a value for theexpectedHash
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for expectedHash- Returns:
- A modified copy of the
this
object
-
withReceivedHash
Copy the current immutable object by setting a value for thereceivedHash
attribute. A shallow reference equality check is used to prevent copying of the same value by returningthis
.- Parameters:
value
- A new value for receivedHash- Returns:
- A modified copy of the
this
object
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofCoffeePickVerification
that have equal attribute values.- Overrides:
equals
in classjava.lang.Object
- Returns:
true
ifthis
is equal toanother
instance
-
hashCode
public int hashCode()Computes a hash code from attributes:expectedHash
,receivedHash
.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueCoffeePickVerification
with attribute values.- Overrides:
toString
in classjava.lang.Object
- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aCoffeePickVerificationType
value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance
- The instance to copy- Returns:
- A copied immutable CoffeePickVerification instance
-
builder
Creates a builder forCoffeePickVerification
.CoffeePickVerification.builder() .setExpectedHash(com.io7m.coffeepick.runtime.RuntimeHash) // required
expectedHash
.setReceivedHash(com.io7m.coffeepick.runtime.RuntimeHash) // requiredreceivedHash
.build();- Returns:
- A new CoffeePickVerification builder
-