Record Class LocalizedText
java.lang.Object
java.lang.Record
org.eclipse.milo.opcua.stack.core.types.builtin.LocalizedText
- Record Components:
locale- the locale of the text.text- the text in the specified locale.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLocalizedText(@Nullable String text) Create aLocalizedTextin English locale.LocalizedText(@Nullable String locale, @Nullable String text) Creates an instance of aLocalizedTextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic LocalizedTextCreate aLocalizedTextin English locale.final booleanIndicates whether some other object is "equal to" this one.@Nullable String@Nullable StringgetText()final inthashCode()Returns a hash code value for this object.booleanCheck if theLocalizedTextis not "null".booleanisNull()Check if theLocalizedTextis "null".@Nullable Stringlocale()Returns the value of thelocalerecord component.@Nullable Stringtext()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NULL_VALUE
-
-
Constructor Details
-
LocalizedText
Create aLocalizedTextin English locale.- Parameters:
text- the text in English locale.
-
LocalizedText
Creates an instance of aLocalizedTextrecord class.
-
-
Method Details
-
getLocale
- Returns:
- the locale of the text.
-
getText
- Returns:
- the text in the specified locale.
-
isNull
public boolean isNull()Check if theLocalizedTextis "null".A
LocalizedTextis "null" if both thelocaleandtextare null.- Returns:
trueif theLocalizedTextis null,falseotherwise.
-
isNotNull
public boolean isNotNull()Check if theLocalizedTextis not "null".A
LocalizedTextis not "null" if either thelocaleortextis not null.- Returns:
trueif theLocalizedTextis not null,falseotherwise.
-
english
Create aLocalizedTextin English locale.- Parameters:
text- the text in English locale.- Returns:
- a
LocalizedTextin English locale.
-
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
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
locale
Returns the value of thelocalerecord component.- Returns:
- the value of the
localerecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-