Record Class Edge

java.lang.Object
java.lang.Record
com.google.adk.workflow.Edge
Record Components:
from - The node whose completion fires this edge.
to - The node this edge triggers.
routes - The routes that select this edge. An empty list makes the edge unconditional.

@Experimental public record Edge(Node from, Node to, com.google.common.collect.ImmutableList<Route> routes) extends Record
工作流图中的两个节点之间的连接。一条没有具体路径的边(即“无路径的边”)会在其源节点完成操作时立即被执行;而其他所有边则只有在其中某条路径被选中时才会被执行。 Route 该描述说明了产品的功能或特性。
  • 构造函数概述

    Constructors
    Constructor
    Description
    Edge(Node from, Node to)
    创建一个无条件的边(即两个节点之间的连接)。
    Edge(Node from, Node to, Route route)
    根据单一路由所选的数据创建一条边(即连接两个节点的线段)。
    Edge(Node from, Node to, com.google.common.collect.ImmutableList<Route> routes)
    创建一个……的实例。 Edge 记录类(Record Class)。
  • 方法概述

    Modifier and Type
    Method
    Description
    final boolean
    用于表示另一个对象是否“等于”当前这个对象。
    返回该值的值。 from “record component”(记录组件)。
    final int
    返回该对象的哈希码值。
    boolean
    返回值 true 如果无论源节点发送何种路由信息,这条边(即数据传输路径)都会被触发(即数据传输会继续进行)。
    com.google.common.collect.ImmutableList<Route>
    返回该值的值。 routes “record component”(记录组件)。
    to()
    返回该值的值。 to “record component”(记录组件)。
    final String
    返回该记录类的字符串表示形式。

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 构造函数详细信息

    • Edge

      public Edge(Node from, Node to, com.google.common.collect.ImmutableList<Route> routes)
      创建一个……的实例。 Edge 记录类(Record Class)。
      Parameters:
      from - the value for the from record component
      to - the value for the to record component
      routes - the value for the routes record component
    • Edge

      public Edge(Node from, Node to)
      创建一个无条件的边(即两个节点之间的连接)。
    • Edge

      public Edge(Node from, Node to, Route route)
      根据单一路由所选的数据创建一条边(即连接两个节点的线段)。
  • 方法详细信息(Method Details)

    • isUnconditional

      public boolean isUnconditional()
      返回值 true 如果无论源节点发送何种路由信息,这条边(即数据传输路径)都会被触发(即数据传输会继续进行)。
    • 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.
    • from

      public Node from()
      返回该值的值。 from “record component”(记录组件)。
      Returns:
      the value of the from record component
    • to

      public Node to()
      返回该值的值。 to “record component”(记录组件)。
      Returns:
      the value of the to record component
    • routes

      public com.google.common.collect.ImmutableList<Route> routes()
      返回该值的值。 routes “record component”(记录组件)。
      Returns:
      the value of the routes record component