Record Class ClassifierContent.JsonObject

java.lang.Object
java.lang.Record
com.google.adk.classifiers.ClassifierContent.JsonObject
All Implemented Interfaces:
ClassifierContent, ClassifierInput
Enclosing interface:
ClassifierContent

public static record ClassifierContent.JsonObject(com.fasterxml.jackson.databind.node.ObjectNode json) extends Record implements ClassifierContent
这是一个 JSON 对象。尝试创建一个 JSON 对象时可能会抛出异常(即出现错误)。 IllegalArgumentException if json 这些结构可以嵌套超过 200 层;或者存储的数值是一个无限大的整数(即一个超出常规范围、无法用有限数字表示的数值)。 long或者是一个不是 JSON 格式的值。
  • 构造函数详细信息

    • JsonObject

      public JsonObject(com.fasterxml.jackson.databind.node.ObjectNode json)
      创建一个……的实例。 JsonObject 记录类(Record Class)。
      Parameters:
      json - the value for the json record component
  • 方法详细信息(Method Details)

    • json

      public com.fasterxml.jackson.databind.node.ObjectNode json()
      返回该对象的副本;其中每个数字都会被解析为相应的 long 类型或 double 类型,并以该类型进行存储。
    • toString

      public final String toString()
      返回该记录类的字符串表示形式。该字符串包含类的名称,以及每个记录组件的名称和对应的值。
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      返回该对象的哈希码值。该哈希码值是由该对象中每个组件的哈希码计算得出的。
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      用于判断另一个对象是否“等于”当前对象。当另一个对象属于相同的类,并且所有记录组件都相同时,这两个对象才被认为是相等的。该记录类中的所有组件都会被逐一进行比较。 Objects::equals(Object,Object).
      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.