Class ImmutableCloudPackage.ImmutableData
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudPackage.ImmutableData
-
- All Implemented Interfaces:
CloudPackage.Data
- Enclosing class:
- ImmutableCloudPackage
public static final class ImmutableCloudPackage.ImmutableData extends Object implements CloudPackage.Data
Immutable implementation ofCloudPackage.Data.Use the builder to create immutable instances:
ImmutableCloudPackage.ImmutableData.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCloudPackage.ImmutableData.BuilderBuilds instances of typeImmutableData.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCloudPackage.ImmutableData.Builderbuilder()Creates a builder forImmutableData.static ImmutableCloudPackage.ImmutableDatacopyOf(CloudPackage.Data instance)Creates an immutable copy of aCloudPackage.Datavalue.booleanequals(Object another)This instance is equal to all instances ofImmutableDatathat have equal attribute values.CloudPackage.ChecksumgetChecksum()StringgetError()inthashCode()Computes a hash code from attributes:checksum,error.StringtoString()Prints the immutable valueDatawith attribute values.ImmutableCloudPackage.ImmutableDatawithChecksum(CloudPackage.Checksum value)Copy the current immutable object by setting a value for thechecksumattribute.ImmutableCloudPackage.ImmutableDatawithError(String value)Copy the current immutable object by setting a value for theerrorattribute.
-
-
-
Method Detail
-
getChecksum
public CloudPackage.Checksum getChecksum()
- Specified by:
getChecksumin interfaceCloudPackage.Data- Returns:
- The value of the
checksumattribute
-
getError
public String getError()
- Specified by:
getErrorin interfaceCloudPackage.Data- Returns:
- The value of the
errorattribute
-
withChecksum
public final ImmutableCloudPackage.ImmutableData withChecksum(CloudPackage.Checksum value)
Copy the current immutable object by setting a value for thechecksumattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for checksum (can benull)- Returns:
- A modified copy of the
thisobject
-
withError
public final ImmutableCloudPackage.ImmutableData withError(String value)
Copy the current immutable object by setting a value for theerrorattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for error (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableDatathat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:checksum,error.
-
toString
public String toString()
Prints the immutable valueDatawith attribute values.
-
copyOf
public static ImmutableCloudPackage.ImmutableData copyOf(CloudPackage.Data instance)
Creates an immutable copy of aCloudPackage.Datavalue. 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 Data instance
-
builder
public static ImmutableCloudPackage.ImmutableData.Builder builder()
Creates a builder forImmutableData.ImmutableCloudPackage.ImmutableData.builder() .checksum(com.sap.cloudfoundry.client.facade.domain.CloudPackage.Checksum | null) // nullablechecksum.error(String | null) // nullableerror.build();- Returns:
- A new ImmutableData builder
-
-