Class ImmutableInstanceInfo
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableInstanceInfo
-
- All Implemented Interfaces:
InstanceInfo
@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableInstanceInfo extends Object implements InstanceInfo
Immutable implementation ofInstanceInfo.Use the builder to create immutable instances:
ImmutableInstanceInfo.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableInstanceInfo.BuilderBuilds instances of typeImmutableInstanceInfo.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableInstanceInfo.Builderbuilder()Creates a builder forImmutableInstanceInfo.static ImmutableInstanceInfocopyOf(InstanceInfo instance)Creates an immutable copy of aInstanceInfovalue.booleanequals(Object another)This instance is equal to all instances ofImmutableInstanceInfothat have equal attribute values.intgetIndex()InstanceStategetState()inthashCode()Computes a hash code from attributes:index,state.StringtoString()Prints the immutable valueInstanceInfowith attribute values.ImmutableInstanceInfowithIndex(int value)Copy the current immutable object by setting a value for theindexattribute.ImmutableInstanceInfowithState(InstanceState value)Copy the current immutable object by setting a value for thestateattribute.
-
-
-
Method Detail
-
getIndex
public int getIndex()
- Specified by:
getIndexin interfaceInstanceInfo- Returns:
- The value of the
indexattribute
-
getState
public InstanceState getState()
- Specified by:
getStatein interfaceInstanceInfo- Returns:
- The value of the
stateattribute
-
withIndex
public final ImmutableInstanceInfo withIndex(int value)
Copy the current immutable object by setting a value for theindexattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
withState
public final ImmutableInstanceInfo withState(InstanceState value)
Copy the current immutable object by setting a value for thestateattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for state- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableInstanceInfothat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:index,state.
-
toString
public String toString()
Prints the immutable valueInstanceInfowith attribute values.
-
copyOf
public static ImmutableInstanceInfo copyOf(InstanceInfo instance)
Creates an immutable copy of aInstanceInfovalue. 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 InstanceInfo instance
-
builder
public static ImmutableInstanceInfo.Builder builder()
Creates a builder forImmutableInstanceInfo.ImmutableInstanceInfo.builder() .index(int) // requiredindex.state(com.sap.cloudfoundry.client.facade.domain.InstanceState) // requiredstate.build();- Returns:
- A new ImmutableInstanceInfo builder
-
-