Record Class ChartSerialization.JsonWithFunctions
java.lang.Object
java.lang.Record
com.vaadin.flow.component.charts.util.ChartSerialization.JsonWithFunctions
- Record Components:
json- the JSON tree, without the functionsfunctionPaths- the path of each function in the tree, as an array of property names and array indexesfunctions- the functions, in the order of their pathshasStringFunction- whether the JSON has a function given as a string, which is only looked for when the CSP mode reports it
- All Implemented Interfaces:
Serializable
- Enclosing class:
ChartSerialization
public static record ChartSerialization.JsonWithFunctions(tools.jackson.databind.JsonNode json, tools.jackson.databind.node.ArrayNode functionPaths, List<ChartFunction> functions, boolean hasStringFunction)
extends Record
implements Serializable
A configuration object serialized to a JSON tree, and its
ChartFunction values.
For internal use only. May be renamed or removed in a future release.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJsonWithFunctions(tools.jackson.databind.JsonNode json, tools.jackson.databind.node.ArrayNode functionPaths, List<ChartFunction> functions, boolean hasStringFunction) Creates an instance of aJsonWithFunctionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Gets the functions as an array, for a varargs parameter.tools.jackson.databind.node.ArrayNodeReturns the value of thefunctionPathsrecord component.Returns the value of thefunctionsrecord component.booleanGets whether the configuration object has any functions.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasStringFunctionrecord component.tools.jackson.databind.JsonNodejson()Returns the value of thejsonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JsonWithFunctions
public JsonWithFunctions(tools.jackson.databind.JsonNode json, tools.jackson.databind.node.ArrayNode functionPaths, List<ChartFunction> functions, boolean hasStringFunction) Creates an instance of aJsonWithFunctionsrecord class.- Parameters:
json- the value for thejsonrecord componentfunctionPaths- the value for thefunctionPathsrecord componentfunctions- the value for thefunctionsrecord componenthasStringFunction- the value for thehasStringFunctionrecord component
-
-
Method Details
-
hasFunctions
public boolean hasFunctions()Gets whether the configuration object has any functions.- Returns:
trueif there are functions
-
functionArray
Gets the functions as an array, for a varargs parameter.- Returns:
- the functions, not
null
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
json
public tools.jackson.databind.JsonNode json()Returns the value of thejsonrecord component.- Returns:
- the value of the
jsonrecord component
-
functionPaths
public tools.jackson.databind.node.ArrayNode functionPaths()Returns the value of thefunctionPathsrecord component.- Returns:
- the value of the
functionPathsrecord component
-
functions
Returns the value of thefunctionsrecord component.- Returns:
- the value of the
functionsrecord component
-
hasStringFunction
public boolean hasStringFunction()Returns the value of thehasStringFunctionrecord component.- Returns:
- the value of the
hasStringFunctionrecord component
-