Interface Graph.EndpointPair<N>

Type Parameters:
N - node type | 节点类型
Enclosing interface:
Graph<N>

public static interface Graph.EndpointPair<N>
Endpoint pair representing an edge. 表示边的端点对。
Since:
JDK 25, opencode-base-collections V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Check if this is an ordered (directed) pair.
    Return the source node (for directed graphs) or one endpoint (for undirected).
    Return the target node (for directed graphs) or the other endpoint (for undirected).
  • Method Details

    • source

      N source()
      Return the source node (for directed graphs) or one endpoint (for undirected). 返回源节点(有向图)或一个端点(无向图)。
      Returns:
      the source | 源
    • target

      N target()
      Return the target node (for directed graphs) or the other endpoint (for undirected). 返回目标节点(有向图)或另一个端点(无向图)。
      Returns:
      the target | 目标
    • isOrdered

      boolean isOrdered()
      Check if this is an ordered (directed) pair. 检查此是否为有序(有向)对。
      Returns:
      true if ordered | 如果有序则返回 true