Record Class StringExpression
java.lang.Object
java.lang.Record
io.openems.edge.core.appmanager.formly.expression.StringExpression
-
Constructor Summary
ConstructorDescriptionStringExpression
(String expression) Creates an instance of aStringExpression
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexpression
record component.final int
hashCode()
Returns a hash code value for this object.Used when adding aStringExpression
inside a translation.static StringExpression
Creates aStringExpression
of the given string.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
StringExpression
Creates an instance of aStringExpression
record class.- Parameters:
expression
- the value for theexpression
record component
-
-
Method Details
-
of
Creates aStringExpression
of the given string.- Parameters:
string
- the string to created theStringExpression
from- Returns:
- the created
StringExpression
-
insideTranslation
Used when adding aStringExpression
inside a translation.Usage:
var insideStringExpression = StringExpression.of("inside"); StringExpression.of(TranslationUtil.getTranslation(bundle, "key", // insideStringExpression.insideTranslation()));
- Returns:
- the string to use in the translation
-
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)
. -
expression
Returns the value of theexpression
record component.- Returns:
- the value of the
expression
record component
-