Package io.dialob.api.rest
Class ImmutableIdAndRevision
java.lang.Object
io.dialob.api.rest.ImmutableIdAndRevision
- All Implemented Interfaces:
IdAndRevision,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
public final class ImmutableIdAndRevision
extends Object
implements IdAndRevision
Immutable implementation of
IdAndRevision.
Use the builder to create immutable instances:
ImmutableIdAndRevision.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableIdAndRevision. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableIdAndRevision.static ImmutableIdAndRevisioncopyOf(IdAndRevision instance) Creates an immutable copy of aIdAndRevisionvalue.booleanThis instance is equal to all instances ofImmutableIdAndRevisionthat have equal attribute values.getId()getRev()inthashCode()Computes a hash code from attributes:id,rev.toString()Prints the immutable valueIdAndRevisionwith attribute values.final ImmutableIdAndRevisionCopy the current immutable object by setting a value for theidattribute.final ImmutableIdAndRevisionCopy the current immutable object by setting a value for therevattribute.
-
Method Details
-
getId
- Specified by:
getIdin interfaceIdAndRevision- Returns:
- The value of the
idattribute
-
getRev
- Specified by:
getRevin interfaceIdAndRevision- Returns:
- The value of the
revattribute
-
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
-
withRev
Copy the current immutable object by setting a value for therevattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for rev- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableIdAndRevisionthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:id,rev. -
toString
Prints the immutable valueIdAndRevisionwith attribute values. -
copyOf
Creates an immutable copy of aIdAndRevisionvalue. 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 IdAndRevision instance
-
builder
Creates a builder forImmutableIdAndRevision.ImmutableIdAndRevision.builder() .id(String) // requiredid.rev(String) // requiredrev.build();- Returns:
- A new ImmutableIdAndRevision builder
-