Record Class Font.UnihexFont

java.lang.Object
java.lang.Record
com.github.darksoulq.abyssallib.server.resource.asset.Font.UnihexFont
Record Components:
fontId - The key identifier of the font.
file - The Hex file path.
sizeOverrides - List of spacing adjustments for subsets.
All Implemented Interfaces:
Font.Glyph
Enclosing class:
Font

public static record Font.UnihexFont(net.kyori.adventure.key.Key fontId, String file, List<Font.UnihexFont.Override> sizeOverrides) extends Record implements Font.Glyph
Unihex font provider with size overrides.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final record 
    Represents a dimensional spacing override within the Unihex font.
  • Constructor Summary

    Constructors
    Constructor
    Description
    UnihexFont(net.kyori.adventure.key.Key fontId, String file, List<Font.UnihexFont.Override> sizeOverrides)
    Creates an instance of a UnihexFont record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    Returns the value of the file record component.
    net.kyori.adventure.key.Key
    Returns the value of the fontId record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the sizeOverrides record component.
    com.google.gson.JsonObject
    Serializes the provider into a JSON object representation.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

    • UnihexFont

      public UnihexFont(net.kyori.adventure.key.Key fontId, String file, List<Font.UnihexFont.Override> sizeOverrides)
      Creates an instance of a UnihexFont record class.
      Parameters:
      fontId - the value for the fontId record component
      file - the value for the file record component
      sizeOverrides - the value for the sizeOverrides record component
  • Method Details

    • toJson

      public com.google.gson.JsonObject toJson()
      Serializes the provider into a JSON object representation.
      Returns:
      The generated JsonObject.
    • 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.
    • fontId

      public net.kyori.adventure.key.Key fontId()
      Returns the value of the fontId record component.
      Returns:
      the value of the fontId record component
    • file

      public String file()
      Returns the value of the file record component.
      Returns:
      the value of the file record component
    • sizeOverrides

      public List<Font.UnihexFont.Override> sizeOverrides()
      Returns the value of the sizeOverrides record component.
      Returns:
      the value of the sizeOverrides record component