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 ofIdAndRevision.Use the builder to create immutable instances:
ImmutableIdAndRevision.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableIdAndRevision.BuilderBuilds instances of typeImmutableIdAndRevision.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableIdAndRevision.Builderbuilder()Creates a builder forImmutableIdAndRevision.static ImmutableIdAndRevisioncopyOf(IdAndRevision instance)Creates an immutable copy of aIdAndRevisionvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableIdAndRevisionthat have equal attribute values.StringgetId()StringgetRev()inthashCode()Computes a hash code from attributes:id,rev.StringtoString()Prints the immutable valueIdAndRevisionwith attribute values.ImmutableIdAndRevisionwithId(String value)Copy the current immutable object by setting a value for theidattribute.ImmutableIdAndRevisionwithRev(String value)Copy the current immutable object by setting a value for therevattribute.
-
-
-
Method Detail
-
getId
public String getId()
- Specified by:
getIdin interfaceIdAndRevision- Returns:
- The value of the
idattribute
-
getRev
public String getRev()
- Specified by:
getRevin interfaceIdAndRevision- Returns:
- The value of the
revattribute
-
withId
public final ImmutableIdAndRevision withId(String value)
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
public final ImmutableIdAndRevision withRev(String value)
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
public boolean equals(@Nullable Object another)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
public String toString()
Prints the immutable valueIdAndRevisionwith attribute values.
-
copyOf
public static ImmutableIdAndRevision copyOf(IdAndRevision instance)
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
public static ImmutableIdAndRevision.Builder builder()
Creates a builder forImmutableIdAndRevision.ImmutableIdAndRevision.builder() .id(String) // requiredid.rev(String) // requiredrev.build();- Returns:
- A new ImmutableIdAndRevision builder
-
-