Record Class TextEntry

java.lang.Object
java.lang.Record
org.tquadrat.foundation.i18n.ap.TextEntry
Record Components:
key - The resource bundle key for the text or message.
isMessage - true if the entry is for a message, false if not.
locale - The locale for this translation of a text or a message.
description - The description for the text or message.
text - The text or message itself for the given locale; newlines will be replaced by the respective escape sequence ("\n").
className - The fully qualified name of the class that defines the text or message.

@ClassVersion(sourceVersion="$Id: TextEntry.java 1130 2024-05-05 16:16:09Z tquadrat $") @API(status=INTERNAL, since="0.1.0") public record TextEntry(String key, boolean isMessage, Locale locale, String description, String text, String className) extends Record
Entries for resource bundle properties files.
Author:
Thomas Thrien (thomas.thrien@tquadrat.org)
Version:
$Id: TextEntry.java 1130 2024-05-05 16:16:09Z tquadrat $
Since:
0.1.0
UML Diagram
UML Diagram for "org.tquadrat.foundation.i18n.ap.TextEntry"

UML Diagram for "org.tquadrat.foundation.i18n.ap.TextEntry"

UML Diagram for "org.tquadrat.foundation.i18n.ap.TextEntry"
  • Field Details

  • Constructor Details

    • TextEntry

      public TextEntry(String key, boolean isMessage, Locale locale, String description, String text, String className)
      Creates a new instance of TexEntry.
      Parameters:
      key - The resource bundle key for the text or message.
      isMessage - true if the entry is for a message, false if not.
      locale - The locale for this translation of a text or a message.
      description - The description for the text or message.
      text - The text or message itself for the given locale; newlines will be replaced by the respective escape sequence ("\n").
      className - The fully qualified name of the class that defines the text or message.
  • Method Details

    • 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.
    • key

      public String key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • isMessage

      public boolean isMessage()
      Returns the value of the isMessage record component.
      Returns:
      the value of the isMessage record component
    • locale

      public Locale locale()
      Returns the value of the locale record component.
      Returns:
      the value of the locale record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • className

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