Class ImmutableCloudTask.ImmutableLimits
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudTask.ImmutableLimits
-
- All Implemented Interfaces:
CloudTask.Limits
- Enclosing class:
- ImmutableCloudTask
public static final class ImmutableCloudTask.ImmutableLimits extends Object implements CloudTask.Limits
Immutable implementation ofCloudTask.Limits.Use the builder to create immutable instances:
ImmutableCloudTask.ImmutableLimits.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCloudTask.ImmutableLimits.BuilderBuilds instances of typeImmutableLimits.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCloudTask.ImmutableLimits.Builderbuilder()Creates a builder forImmutableLimits.static ImmutableCloudTask.ImmutableLimitscopyOf(CloudTask.Limits instance)Creates an immutable copy of aCloudTask.Limitsvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableLimitsthat have equal attribute values.IntegergetDisk()IntegergetMemory()inthashCode()Computes a hash code from attributes:disk,memory.StringtoString()Prints the immutable valueLimitswith attribute values.ImmutableCloudTask.ImmutableLimitswithDisk(Integer value)Copy the current immutable object by setting a value for thediskattribute.ImmutableCloudTask.ImmutableLimitswithMemory(Integer value)Copy the current immutable object by setting a value for thememoryattribute.
-
-
-
Method Detail
-
getDisk
public Integer getDisk()
- Specified by:
getDiskin interfaceCloudTask.Limits- Returns:
- The value of the
diskattribute
-
getMemory
public Integer getMemory()
- Specified by:
getMemoryin interfaceCloudTask.Limits- Returns:
- The value of the
memoryattribute
-
withDisk
public final ImmutableCloudTask.ImmutableLimits withDisk(Integer value)
Copy the current immutable object by setting a value for thediskattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for disk (can benull)- Returns:
- A modified copy of the
thisobject
-
withMemory
public final ImmutableCloudTask.ImmutableLimits withMemory(Integer value)
Copy the current immutable object by setting a value for thememoryattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for memory (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableLimitsthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:disk,memory.
-
toString
public String toString()
Prints the immutable valueLimitswith attribute values.
-
copyOf
public static ImmutableCloudTask.ImmutableLimits copyOf(CloudTask.Limits instance)
Creates an immutable copy of aCloudTask.Limitsvalue. 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 Limits instance
-
builder
public static ImmutableCloudTask.ImmutableLimits.Builder builder()
Creates a builder forImmutableLimits.ImmutableCloudTask.ImmutableLimits.builder() .disk(Integer | null) // nullabledisk.memory(Integer | null) // nullablememory.build();- Returns:
- A new ImmutableLimits builder
-
-