Class ImmutableRaftIndex

java.lang.Object
org.kiwiproject.consul.model.query.RaftIndex
org.kiwiproject.consul.model.query.ImmutableRaftIndex

@Generated("org.immutables.processor.ProxyProcessor") public final class ImmutableRaftIndex extends RaftIndex
Immutable implementation of RaftIndex.

Use the builder to create immutable instances: ImmutableRaftIndex.builder().

  • Method Details

    • equals

      public boolean equals(@Nullable Object another)
      This instance is equal to all instances of ImmutableRaftIndex that have equal attribute values.
      Overrides:
      equals in class Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Returns a constant hash code value.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

      public String toString()
      Prints the immutable value RaftIndex.
      Overrides:
      toString in class Object
      Returns:
      A string representation of the value
    • copyOf

      public static ImmutableRaftIndex copyOf(RaftIndex instance)
      Creates an immutable copy of a RaftIndex value. 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 for ImmutableRaftIndex.
       ImmutableRaftIndex.builder()
          .build();
       
      Returns:
      A new ImmutableRaftIndex builder