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 functions
functionPaths - the path of each function in the tree, as an array of property names and array indexes
functions - the functions, in the order of their paths
hasStringFunction - 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 Details

    • JsonWithFunctions

      public JsonWithFunctions(tools.jackson.databind.JsonNode json, tools.jackson.databind.node.ArrayNode functionPaths, List<ChartFunction> functions, boolean hasStringFunction)
      Creates an instance of a JsonWithFunctions record class.
      Parameters:
      json - the value for the json record component
      functionPaths - the value for the functionPaths record component
      functions - the value for the functions record component
      hasStringFunction - the value for the hasStringFunction record component
  • Method Details

    • hasFunctions

      public boolean hasFunctions()
      Gets whether the configuration object has any functions.
      Returns:
      true if there are functions
    • functionArray

      public ChartFunction[] functionArray()
      Gets the functions as an array, for a varargs parameter.
      Returns:
      the functions, not null
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • json

      public tools.jackson.databind.JsonNode json()
      Returns the value of the json record component.
      Returns:
      the value of the json record component
    • functionPaths

      public tools.jackson.databind.node.ArrayNode functionPaths()
      Returns the value of the functionPaths record component.
      Returns:
      the value of the functionPaths record component
    • functions

      public List<ChartFunction> functions()
      Returns the value of the functions record component.
      Returns:
      the value of the functions record component
    • hasStringFunction

      public boolean hasStringFunction()
      Returns the value of the hasStringFunction record component.
      Returns:
      the value of the hasStringFunction record component