Package org.tquadrat.foundation.i18n.ap
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 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"
-
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
The field for thekeyrecord component. -
isMessage
The field for theisMessagerecord component. -
locale
The field for thelocalerecord component. -
description
The field for thedescriptionrecord component. -
text
The field for thetextrecord component. -
className
The field for theclassNamerecord component.
-
-
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
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. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
isMessage
Returns the value of theisMessagerecord component.- Returns:
- the value of the
isMessagerecord component
-
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
className
Returns the value of theclassNamerecord component.- Returns:
- the value of the
classNamerecord component
-
