Class ImmutableBitsData.ImmutableChecksum
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableBitsData.ImmutableChecksum
-
- All Implemented Interfaces:
BitsData.Checksum
- Enclosing class:
- ImmutableBitsData
public static final class ImmutableBitsData.ImmutableChecksum extends Object implements BitsData.Checksum
Immutable implementation ofBitsData.Checksum.Use the builder to create immutable instances:
ImmutableBitsData.ImmutableChecksum.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableBitsData.ImmutableChecksum.BuilderBuilds instances of typeImmutableChecksum.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableBitsData.ImmutableChecksum.Builderbuilder()Creates a builder forImmutableChecksum.static ImmutableBitsData.ImmutableChecksumcopyOf(BitsData.Checksum instance)Creates an immutable copy of aBitsData.Checksumvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableChecksumthat have equal attribute values.StringgetAlgorithm()StringgetValue()inthashCode()Computes a hash code from attributes:algorithm,value.StringtoString()Prints the immutable valueChecksumwith attribute values.ImmutableBitsData.ImmutableChecksumwithAlgorithm(String value)Copy the current immutable object by setting a value for thealgorithmattribute.ImmutableBitsData.ImmutableChecksumwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithmin interfaceBitsData.Checksum- Returns:
- The value of the
algorithmattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceBitsData.Checksum- Returns:
- The value of the
valueattribute
-
withAlgorithm
public final ImmutableBitsData.ImmutableChecksum withAlgorithm(String value)
Copy the current immutable object by setting a value for thealgorithmattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for algorithm (can benull)- Returns:
- A modified copy of the
thisobject
-
withValue
public final ImmutableBitsData.ImmutableChecksum withValue(String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableChecksumthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:algorithm,value.
-
toString
public String toString()
Prints the immutable valueChecksumwith attribute values.
-
copyOf
public static ImmutableBitsData.ImmutableChecksum copyOf(BitsData.Checksum instance)
Creates an immutable copy of aBitsData.Checksumvalue. 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 Checksum instance
-
builder
public static ImmutableBitsData.ImmutableChecksum.Builder builder()
Creates a builder forImmutableChecksum.ImmutableBitsData.ImmutableChecksum.builder() .algorithm(String | null) // nullablealgorithm.value(String | null) // nullablevalue.build();- Returns:
- A new ImmutableChecksum builder
-
-