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-trueif the entry is for a message,falseif 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 1258 2026-06-04 18:33:06Z 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 1258 2026-06-04 18:33:06Z tquadrat $
- Since:
- 0.1.0
- UML Diagram
-
UML Diagram for "org.tquadrat.foundation.i18n.ap.TextEntry"
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theclassNamerecord component.private final StringThe field for thedescriptionrecord component.private final booleanThe field for theisMessagerecord component.private final StringThe field for thekeyrecord component.private final LocaleThe field for thelocalerecord component.private final StringThe field for thetextrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassNamerecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theisMessagerecord component.key()Returns the value of thekeyrecord component.locale()Returns the value of thelocalerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
key
-
isMessage
-
locale
-
description
The field for thedescriptionrecord component. -
text
-
className
-
-
Constructor Details
-
TextEntry
public TextEntry(String key, boolean isMessage, Locale locale, String description, String text, String className) Creates a new instance ofTexEntry.- Parameters:
key- The resource bundle key for the text or message.isMessage-trueif the entry is for a message,falseif 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
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
key
-
isMessage
-
locale
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
text
-
className
-
