Class ImmutableCloudBuild.ImmutablePackageInfo
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudBuild.ImmutablePackageInfo
-
- All Implemented Interfaces:
CloudBuild.PackageInfo
- Enclosing class:
- ImmutableCloudBuild
public static final class ImmutableCloudBuild.ImmutablePackageInfo extends Object implements CloudBuild.PackageInfo
Immutable implementation ofCloudBuild.PackageInfo.Use the builder to create immutable instances:
ImmutableCloudBuild.ImmutablePackageInfo.builder(). Use the static factory method to create immutable instances:ImmutableCloudBuild.ImmutablePackageInfo.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCloudBuild.ImmutablePackageInfo.BuilderBuilds instances of typeImmutablePackageInfo.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCloudBuild.ImmutablePackageInfo.Builderbuilder()Creates a builder forImmutablePackageInfo.static ImmutableCloudBuild.ImmutablePackageInfocopyOf(CloudBuild.PackageInfo instance)Creates an immutable copy of aCloudBuild.PackageInfovalue.booleanequals(Object another)This instance is equal to all instances ofImmutablePackageInfothat have equal attribute values.UUIDgetGuid()inthashCode()Computes a hash code from attributes:guid.static ImmutableCloudBuild.ImmutablePackageInfoof(UUID guid)Construct a new immutablePackageInfoinstance.StringtoString()Prints the immutable valuePackageInfowith attribute values.ImmutableCloudBuild.ImmutablePackageInfowithGuid(UUID value)Copy the current immutable object by setting a value for theguidattribute.
-
-
-
Method Detail
-
getGuid
public UUID getGuid()
- Specified by:
getGuidin interfaceCloudBuild.PackageInfo- Returns:
- The value of the
guidattribute
-
withGuid
public final ImmutableCloudBuild.ImmutablePackageInfo withGuid(UUID value)
Copy the current immutable object by setting a value for theguidattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for guid (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutablePackageInfothat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:guid.
-
toString
public String toString()
Prints the immutable valuePackageInfowith attribute values.
-
of
public static ImmutableCloudBuild.ImmutablePackageInfo of(UUID guid)
Construct a new immutablePackageInfoinstance.- Parameters:
guid- The value for theguidattribute- Returns:
- An immutable PackageInfo instance
-
copyOf
public static ImmutableCloudBuild.ImmutablePackageInfo copyOf(CloudBuild.PackageInfo instance)
Creates an immutable copy of aCloudBuild.PackageInfovalue. 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 PackageInfo instance
-
builder
public static ImmutableCloudBuild.ImmutablePackageInfo.Builder builder()
Creates a builder forImmutablePackageInfo.ImmutableCloudBuild.ImmutablePackageInfo.builder() .guid(UUID | null) // nullableguid.build();- Returns:
- A new ImmutablePackageInfo builder
-
-