Record Class AdminAccountChanges.Outcome

java.lang.Object
java.lang.Record
com.iizix.server.user.AdminAccountChanges.Outcome
Record Components:
refusal - Why nothing was changed, for the administrator; null when the change was made.
notice - What did not go as planned after the change was made (a mail), for the administrator; null when nothing is to report.
Enclosing class:
AdminAccountChanges

public static record AdminAccountChanges.Outcome(String refusal, String notice) extends Record
The outcome of a change.
Author:
Christopher Mindus
  • Constructor Details

    • Outcome

      public Outcome(String refusal, String notice)
      Creates an instance of a Outcome record class.
      Parameters:
      refusal - the value for the refusal record component
      notice - the value for the notice record component
  • Method Details

    • isDone

      public boolean isDone()
      Checks if the change was made.
      Returns:
      true when it was made (a notice may still be set).
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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
    • notice

      public String notice()
      Returns the value of the notice record component.
      Returns:
      the value of the notice record component