Record Class AdminAccountChanges.HoldOutcome

java.lang.Object
java.lang.Record
com.iizix.server.user.AdminAccountChanges.HoldOutcome
Record Components:
refusal - Why nothing was changed, for the administrator; null when the failures were cleared.
held - true when the account was held when the administrator acted (the hold is ended now), false when it was not at the limit (its failures are cleared all the same).
failures - The failed sign-ins cleared.
Enclosing class:
AdminAccountChanges

public static record AdminAccountChanges.HoldOutcome(String refusal, boolean held, int failures) extends Record
Author:
Christopher Mindus
  • Constructor Summary

    Constructors
    Constructor
    Description
    HoldOutcome(String refusal, boolean held, int failures)
    Creates an instance of a HoldOutcome record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the failures record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the held record component.
    boolean
    Checks if the failures were cleared.
    Returns the value of the refusal record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HoldOutcome

      public HoldOutcome(String refusal, boolean held, int failures)
      Creates an instance of a HoldOutcome record class.
      Parameters:
      refusal - the value for the refusal record component
      held - the value for the held record component
      failures - the value for the failures record component
  • Method Details

    • isDone

      public boolean isDone()
      Checks if the failures were cleared.
      Returns:
      true when they were.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • refusal

      public String refusal()
      Returns the value of the refusal record component.
      Returns:
      the value of the refusal record component
    • held

      public boolean held()
      Returns the value of the held record component.
      Returns:
      the value of the held record component
    • failures

      public int failures()
      Returns the value of the failures record component.
      Returns:
      the value of the failures record component