Class ImmutableWatcherBean

java.lang.Object
com.riadalabs.jira.plugins.insight.services.model.WatcherBean
com.riadalabs.jira.plugins.insight.services.model.ImmutableWatcherBean
All Implemented Interfaces:
Serializable

@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableWatcherBean extends WatcherBean
Immutable implementation of WatcherBean.

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

See Also:
  • Method Details

    • getObjectId

      public Integer getObjectId()
      Specified by:
      getObjectId in class WatcherBean
      Returns:
      The value of the objectId attribute
    • getUserKey

      public String getUserKey()
      Specified by:
      getUserKey in class WatcherBean
      Returns:
      The value of the userKey attribute
    • withObjectId

      public final ImmutableWatcherBean withObjectId(Integer value)
      Copy the current immutable object by setting a value for the objectId attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for objectId
      Returns:
      A modified copy of the this object
    • withUserKey

      public final ImmutableWatcherBean withUserKey(String value)
      Copy the current immutable object by setting a value for the userKey attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for userKey
      Returns:
      A modified copy of the this object
    • equals

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

      public int hashCode()
      Computes a hash code from attributes: objectId, userKey.
      Overrides:
      hashCode in class Object
      Returns:
      hashCode value
    • toString

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

      public static ImmutableWatcherBean copyOf(WatcherBean instance)
      Creates an immutable copy of a WatcherBean 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 WatcherBean instance
    • builder

      public static ImmutableWatcherBean.Builder builder()
      Creates a builder for ImmutableWatcherBean.
       ImmutableWatcherBean.builder()
          .setObjectId(Integer) // required objectId
          .setUserKey(String) // required userKey
          .build();
       
      Returns:
      A new ImmutableWatcherBean builder