Record Class AccessController.ExplanationObject

java.lang.Object
java.lang.Record
org.ametys.core.right.AccessController.ExplanationObject
Record Components:
object - the object
label - a label for the context represented by the object
category - the category the context belongs to
order - order of the context in the category
Enclosing interface:
AccessController

public static record AccessController.ExplanationObject(Object object, I18nizableText label, I18nizableText category, int order) extends Record
A object with an associated label, category and order.
  • Constructor Details

    • ExplanationObject

      public ExplanationObject(Object object, I18nizableText label, I18nizableText category)
      A object with an associated label and category.
      Parameters:
      object - the object
      label - a label for the context represented by the object
      category - the category the context belongs to
    • ExplanationObject

      public ExplanationObject(Object object, I18nizableText label, I18nizableText category, int order)
      Creates an instance of a ExplanationObject record class.
      Parameters:
      object - the value for the object record component
      label - the value for the label record component
      category - the value for the category record component
      order - the value for the order record component
  • Method Details

    • equals

      public final boolean equals(Object other)
      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 '=='.
      Specified by:
      equals in class Record
      Parameters:
      other - the object with which to compare
      Returns:
      true if this object is the same as the other argument; false otherwise.
    • 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
    • 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
    • object

      public Object object()
      Returns the value of the object record component.
      Returns:
      the value of the object record component
    • label

      Returns the value of the label record component.
      Returns:
      the value of the label record component
    • category

      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • order

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