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
-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"
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
The field for theclassName
record component.private final String
The field for thedescription
record component.private final boolean
The field for theisMessage
record component.private final String
The field for thekey
record component.private final Locale
The field for thelocale
record component.private final String
The field for thetext
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassName
record component.Returns the value of thedescription
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
Returns the value of theisMessage
record component.key()
Returns the value of thekey
record component.locale()
Returns the value of thelocale
record component.text()
Returns the value of thetext
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
key
The field for thekey
record component. -
isMessage
The field for theisMessage
record component. -
locale
The field for thelocale
record component. -
description
The field for thedescription
record component. -
text
The field for thetext
record component. -
className
The field for theclassName
record 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
-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
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 thekey
record component.- Returns:
- the value of the
key
record component
-
isMessage
Returns the value of theisMessage
record component.- Returns:
- the value of the
isMessage
record component
-
locale
Returns the value of thelocale
record component.- Returns:
- the value of the
locale
record component
-
description
Returns the value of thedescription
record component.- Returns:
- the value of the
description
record component
-
text
Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-
className
Returns the value of theclassName
record component.- Returns:
- the value of the
className
record component
-