Package io.resys.hdes.client.api
Class ImmutableHistoryEntity
java.lang.Object
io.resys.hdes.client.api.ImmutableHistoryEntity
- All Implemented Interfaces:
HdesStore.HistoryEntity
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableHistoryEntity
extends Object
implements HdesStore.HistoryEntity
Immutable implementation of
HdesStore.HistoryEntity.
Use the builder to create immutable instances:
ImmutableHistoryEntity.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableHistoryEntity. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableHistoryEntity.static ImmutableHistoryEntitycopyOf(HdesStore.HistoryEntity instance) Creates an immutable copy of aHdesStore.HistoryEntityvalue.booleanThis instance is equal to all instances ofImmutableHistoryEntitythat have equal attribute values.com.google.common.collect.ImmutableList<HdesStore.DetachedEntity>getBody()getId()inthashCode()Computes a hash code from attributes:id,bodyType,body.toString()Prints the immutable valueHistoryEntitywith attribute values.final ImmutableHistoryEntitywithBody(HdesStore.DetachedEntity... elements) Copy the current immutable object with elements that replace the content ofbody.final ImmutableHistoryEntitywithBody(Iterable<? extends HdesStore.DetachedEntity> elements) Copy the current immutable object with elements that replace the content ofbody.final ImmutableHistoryEntitywithBodyType(AstBody.AstBodyType value) Copy the current immutable object by setting a value for thebodyTypeattribute.final ImmutableHistoryEntityCopy the current immutable object by setting a value for theidattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceHdesStore.HistoryEntity- Returns:
- The value of the
idattribute
-
getBodyType
- Specified by:
getBodyTypein interfaceHdesStore.HistoryEntity- Returns:
- The value of the
bodyTypeattribute
-
getBody
- Specified by:
getBodyin interfaceHdesStore.HistoryEntity- Returns:
- The value of the
bodyattribute
-
withId
Copy the current immutable object by setting a value for theidattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withBodyType
Copy the current immutable object by setting a value for thebodyTypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for bodyType- Returns:
- A modified copy of the
thisobject
-
withBody
Copy the current immutable object with elements that replace the content ofbody.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withBody
Copy the current immutable object with elements that replace the content ofbody. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of body elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableHistoryEntitythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,bodyType,body. -
toString
Prints the immutable valueHistoryEntitywith attribute values. -
copyOf
Creates an immutable copy of aHdesStore.HistoryEntityvalue. 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 HistoryEntity instance
-
builder
Creates a builder forImmutableHistoryEntity.ImmutableHistoryEntity.builder() .id(String) // requiredid.bodyType(io.resys.hdes.client.api.ast.AstBody.AstBodyType) // requiredbodyType.addBody|addAllBody(io.resys.hdes.client.api.HdesStore.DetachedEntity) //bodyelements .build();- Returns:
- A new ImmutableHistoryEntity builder
-