Package io.resys.hdes.client.api
Class ImmutableDetachedEntity
java.lang.Object
io.resys.hdes.client.api.ImmutableDetachedEntity
- All Implemented Interfaces:
HdesStore.DetachedEntity
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDetachedEntity
extends Object
implements HdesStore.DetachedEntity
Immutable implementation of
HdesStore.DetachedEntity.
Use the builder to create immutable instances:
ImmutableDetachedEntity.builder().
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDetachedEntity. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableDetachedEntity.static ImmutableDetachedEntitycopyOf(HdesStore.DetachedEntity instance) Creates an immutable copy of aHdesStore.DetachedEntityvalue.booleanThis instance is equal to all instances ofImmutableDetachedEntitythat have equal attribute values.com.google.common.collect.ImmutableList<AstCommand>getBody()getHash()inthashCode()Computes a hash code from attributes:hash,created,body.toString()Prints the immutable valueDetachedEntitywith attribute values.final ImmutableDetachedEntitywithBody(AstCommand... elements) Copy the current immutable object with elements that replace the content ofbody.final ImmutableDetachedEntitywithBody(Iterable<? extends AstCommand> elements) Copy the current immutable object with elements that replace the content ofbody.final ImmutableDetachedEntitywithCreated(LocalDateTime value) Copy the current immutable object by setting a value for thecreatedattribute.final ImmutableDetachedEntityCopy the current immutable object by setting a value for thehashattribute.
-
Method Details
-
getHash
- Specified by:
getHashin interfaceHdesStore.DetachedEntity- Returns:
- The value of the
hashattribute
-
getCreated
- Specified by:
getCreatedin interfaceHdesStore.DetachedEntity- Returns:
- The value of the
createdattribute
-
getBody
- Specified by:
getBodyin interfaceHdesStore.DetachedEntity- Returns:
- The value of the
bodyattribute
-
withHash
Copy the current immutable object by setting a value for thehashattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for hash- Returns:
- A modified copy of the
thisobject
-
withCreated
Copy the current immutable object by setting a value for thecreatedattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for created- 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 ofImmutableDetachedEntitythat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:hash,created,body. -
toString
Prints the immutable valueDetachedEntitywith attribute values. -
copyOf
Creates an immutable copy of aHdesStore.DetachedEntityvalue. 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 DetachedEntity instance
-
builder
Creates a builder forImmutableDetachedEntity.ImmutableDetachedEntity.builder() .hash(String) // requiredhash.created(java.time.LocalDateTime) // requiredcreated.addBody|addAllBody(io.resys.hdes.client.api.ast.AstCommand) //bodyelements .build();- Returns:
- A new ImmutableDetachedEntity builder
-