Record Class ArrayExpression
java.lang.Object
java.lang.Record
io.openems.edge.core.appmanager.formly.expression.ArrayExpression
-
Constructor Summary
ConstructorDescriptionArrayExpression
(String array) Creates an instance of aArrayExpression
record class. -
Method Summary
Modifier and TypeMethodDescriptionarray()
Returns the value of thearray
record component.elementAt
(int index) Takes the n-Element of this array and returns it as aVariable
.final boolean
Indicates whether some other object is "equal to" this one.every
(Function<Variable, BooleanExpression> predicate) Creates aBooleanExpression
which checks if every element matches the resultingBooleanExpression
of the predicate.filter
(Function<Variable, BooleanExpression> filter) Creates a newArrayExpression
which is filtered by the given filter.final int
hashCode()
Returns a hash code value for this object.Joins the array into aStringExpression
separated by the given delimiter.length()
Creates a variable of the length of the current array.static ArrayExpression
Creates aArrayExpression
of the given values.some
(Function<Variable, BooleanExpression> predicate) Creates aBooleanExpression
which checks if some elements match the resultingBooleanExpression
of the predicate.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ArrayExpression
Creates an instance of aArrayExpression
record class.- Parameters:
array
- the value for thearray
record component
-
-
Method Details
-
of
Creates aArrayExpression
of the given values.- Parameters:
values
- the values of the array- Returns:
- the created
ArrayExpression
-
length
Creates a variable of the length of the current array.- Returns:
- the
Variable
to obtain the length from
-
filter
Creates a newArrayExpression
which is filtered by the given filter.- Parameters:
filter
- the filter to be applied on every element- Returns:
- the new filtered
ArrayExpression
-
join
Joins the array into aStringExpression
separated by the given delimiter.- Parameters:
delimiter
- the delimiter of the elements- Returns:
- the created
StringExpression
-
every
Creates aBooleanExpression
which checks if every element matches the resultingBooleanExpression
of the predicate.- Parameters:
predicate
- the function to get the expression to validate every element; the supplied variable represents the current element of the array- Returns:
- the final
BooleanExpression
-
some
Creates aBooleanExpression
which checks if some elements match the resultingBooleanExpression
of the predicate.- Parameters:
predicate
- the function to get the expression to validate every element; the supplied variable represents the current element of the array- Returns:
- the final
BooleanExpression
-
elementAt
Takes the n-Element of this array and returns it as aVariable
.- Parameters:
index
- the index of the element- Returns:
- the created
Variable
-
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)
. -
array
Returns the value of thearray
record component.- Returns:
- the value of the
array
record component
-