Record Class EmptyArea

java.lang.Object
java.lang.Record
net.minecraft.client.gui.font.EmptyArea
All Implemented Interfaces:
ActiveArea

public record EmptyArea(float x, float y, float advance, float ascent, float height, Style style) extends Record implements ActiveArea
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final float
    The field for the advance record component.
    private final float
    The field for the ascent record component.
    static final float
     
    static final float
     
    private final float
    The field for the height record component.
    private final Style
    The field for the style record component.
    private final float
    The field for the x record component.
    private final float
    The field for the y record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EmptyArea(float x, float y, float advance, float ascent, float height, Style style)
    Creates an instance of a EmptyArea record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    float
     
    float
     
    float
     
    float
    Returns the value of the advance record component.
    float
    Returns the value of the ascent record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    float
    Returns the value of the height record component.
    Returns the value of the style record component.
    final String
    Returns a string representation of this record class.
    float
    x()
    Returns the value of the x record component.
    float
    y()
    Returns the value of the y record component.

    Methods inherited from class java.lang.Object

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

    • x

      private final float x
      The field for the x record component.
    • y

      private final float y
      The field for the y record component.
    • advance

      private final float advance
      The field for the advance record component.
    • ascent

      private final float ascent
      The field for the ascent record component.
    • height

      private final float height
      The field for the height record component.
    • style

      private final Style style
      The field for the style record component.
    • DEFAULT_HEIGHT

      public static final float DEFAULT_HEIGHT
      See Also:
    • DEFAULT_ASCENT

      public static final float DEFAULT_ASCENT
      See Also:
  • Constructor Details

    • EmptyArea

      public EmptyArea(float x, float y, float advance, float ascent, float height, Style style)
      Creates an instance of a EmptyArea record class.
      Parameters:
      x - the value for the x record component
      y - the value for the y record component
      advance - the value for the advance record component
      ascent - the value for the ascent record component
      height - the value for the height record component
      style - the value for the style record component
  • Method Details

    • activeLeft

      public float activeLeft()
      Specified by:
      activeLeft in interface ActiveArea
    • activeTop

      public float activeTop()
      Specified by:
      activeTop in interface ActiveArea
    • activeRight

      public float activeRight()
      Specified by:
      activeRight in interface ActiveArea
    • activeBottom

      public float activeBottom()
      Specified by:
      activeBottom in interface ActiveArea
    • 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 '=='.
      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.
    • x

      public float x()
      Returns the value of the x record component.
      Returns:
      the value of the x record component
    • y

      public float y()
      Returns the value of the y record component.
      Returns:
      the value of the y record component
    • advance

      public float advance()
      Returns the value of the advance record component.
      Returns:
      the value of the advance record component
    • ascent

      public float ascent()
      Returns the value of the ascent record component.
      Returns:
      the value of the ascent record component
    • height

      public float height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • style

      public Style style()
      Returns the value of the style record component.
      Specified by:
      style in interface ActiveArea
      Returns:
      the value of the style record component