Package com.orbitz.consul.model.query
Class ImmutableRaftIndex
- java.lang.Object
-
- com.orbitz.consul.model.query.RaftIndex
-
- com.orbitz.consul.model.query.ImmutableRaftIndex
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableRaftIndex.BuilderBuilds instances of typeImmutableRaftIndex.
-
Method Summary
Modifier and Type Method Description static ImmutableRaftIndex.Builderbuilder()Creates a builder forImmutableRaftIndex.static ImmutableRaftIndexcopyOf(RaftIndex instance)Creates an immutable copy of aRaftIndexvalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableRaftIndexthat have equal attribute values.inthashCode()Returns a constant hash code value.java.lang.StringtoString()Prints the immutable valueRaftIndex.
-
-
-
Method Detail
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableRaftIndexthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Returns a constant hash code value.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueRaftIndex.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
public static ImmutableRaftIndex copyOf(RaftIndex instance)
Creates an immutable copy of aRaftIndexvalue. 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 RaftIndex instance
-
builder
public static ImmutableRaftIndex.Builder builder()
Creates a builder forImmutableRaftIndex.ImmutableRaftIndex.builder() .build();- Returns:
- A new ImmutableRaftIndex builder
-
-