Class ImmutableCloudEvent.ImmutableParticipant
- java.lang.Object
-
- com.sap.cloudfoundry.client.facade.domain.ImmutableCloudEvent.ImmutableParticipant
-
- All Implemented Interfaces:
CloudEvent.Participant
- Enclosing class:
- ImmutableCloudEvent
public static final class ImmutableCloudEvent.ImmutableParticipant extends Object implements CloudEvent.Participant
Immutable implementation ofCloudEvent.Participant.Use the builder to create immutable instances:
ImmutableCloudEvent.ImmutableParticipant.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCloudEvent.ImmutableParticipant.BuilderBuilds instances of typeImmutableParticipant.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCloudEvent.ImmutableParticipant.Builderbuilder()Creates a builder forImmutableParticipant.static ImmutableCloudEvent.ImmutableParticipantcopyOf(CloudEvent.Participant instance)Creates an immutable copy of aCloudEvent.Participantvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableParticipantthat have equal attribute values.UUIDgetGuid()StringgetName()StringgetType()inthashCode()Computes a hash code from attributes:guid,name,type.StringtoString()Prints the immutable valueParticipantwith attribute values.ImmutableCloudEvent.ImmutableParticipantwithGuid(UUID value)Copy the current immutable object by setting a value for theguidattribute.ImmutableCloudEvent.ImmutableParticipantwithName(String value)Copy the current immutable object by setting a value for thenameattribute.ImmutableCloudEvent.ImmutableParticipantwithType(String value)Copy the current immutable object by setting a value for thetypeattribute.
-
-
-
Method Detail
-
getGuid
public UUID getGuid()
- Specified by:
getGuidin interfaceCloudEvent.Participant- Returns:
- The value of the
guidattribute
-
getName
public String getName()
- Specified by:
getNamein interfaceCloudEvent.Participant- Returns:
- The value of the
nameattribute
-
getType
public String getType()
- Specified by:
getTypein interfaceCloudEvent.Participant- Returns:
- The value of the
typeattribute
-
withGuid
public final ImmutableCloudEvent.ImmutableParticipant 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
-
withName
public final ImmutableCloudEvent.ImmutableParticipant withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name (can benull)- Returns:
- A modified copy of the
thisobject
-
withType
public final ImmutableCloudEvent.ImmutableParticipant withType(String value)
Copy the current immutable object by setting a value for thetypeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(Object another)
This instance is equal to all instances ofImmutableParticipantthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:guid,name,type.
-
toString
public String toString()
Prints the immutable valueParticipantwith attribute values.
-
copyOf
public static ImmutableCloudEvent.ImmutableParticipant copyOf(CloudEvent.Participant instance)
Creates an immutable copy of aCloudEvent.Participantvalue. 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 Participant instance
-
builder
public static ImmutableCloudEvent.ImmutableParticipant.Builder builder()
Creates a builder forImmutableParticipant.ImmutableCloudEvent.ImmutableParticipant.builder() .guid(UUID | null) // nullableguid.name(String | null) // nullablename.type(String | null) // nullabletype.build();- Returns:
- A new ImmutableParticipant builder
-
-