Class ImmutableCloudPackage.ImmutableChecksum
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudPackage.ImmutableChecksum
-
- All Implemented Interfaces:
CloudPackage.Checksum
- Enclosing class:
- ImmutableCloudPackage
public static final class ImmutableCloudPackage.ImmutableChecksum extends Object implements CloudPackage.Checksum
Immutable implementation ofCloudPackage.Checksum.Use the builder to create immutable instances:
ImmutableCloudPackage.ImmutableChecksum.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCloudPackage.ImmutableChecksum.BuilderBuilds instances of typeImmutableChecksum.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCloudPackage.ImmutableChecksum.Builderbuilder()Creates a builder forImmutableChecksum.static ImmutableCloudPackage.ImmutableChecksumcopyOf(CloudPackage.Checksum instance)Creates an immutable copy of aCloudPackage.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.ImmutableCloudPackage.ImmutableChecksumwithAlgorithm(String value)Copy the current immutable object by setting a value for thealgorithmattribute.ImmutableCloudPackage.ImmutableChecksumwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getAlgorithm
public String getAlgorithm()
- Specified by:
getAlgorithmin interfaceCloudPackage.Checksum- Returns:
- The value of the
algorithmattribute
-
getValue
public String getValue()
- Specified by:
getValuein interfaceCloudPackage.Checksum- Returns:
- The value of the
valueattribute
-
withAlgorithm
public final ImmutableCloudPackage.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 ImmutableCloudPackage.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 ImmutableCloudPackage.ImmutableChecksum copyOf(CloudPackage.Checksum instance)
Creates an immutable copy of aCloudPackage.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 ImmutableCloudPackage.ImmutableChecksum.Builder builder()
Creates a builder forImmutableChecksum.ImmutableCloudPackage.ImmutableChecksum.builder() .algorithm(String | null) // nullablealgorithm.value(String | null) // nullablevalue.build();- Returns:
- A new ImmutableChecksum builder
-
-