Class TarjanLowestCommonAncestor.LcaRequestResponse<V>

  • Type Parameters:
    V - the graph vertex type
    Enclosing class:
    TarjanLowestCommonAncestor<V,​E>

    public static class TarjanLowestCommonAncestor.LcaRequestResponse<V>
    extends java.lang.Object
    Data transfer object for LCA request and response.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private V a  
      private V b  
      private V lca  
    • Constructor Summary

      Constructors 
      Constructor Description
      LcaRequestResponse​(V a, V b)
      Create a new LCA request response data transfer object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      V getA()
      Get the first vertex of the request
      V getB()
      Get the second vertex of the request
      V getLca()
      Get the least common ancestor
      (package private) void setLca​(V lca)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • a

        private V a
      • b

        private V b
      • lca

        private V lca
    • Constructor Detail

      • LcaRequestResponse

        public LcaRequestResponse​(V a,
                                  V b)
        Create a new LCA request response data transfer object.
        Parameters:
        a - the first vertex of the request
        b - the second vertex of the request
    • Method Detail

      • getA

        public V getA()
        Get the first vertex of the request
        Returns:
        the first vertex of the request
      • getB

        public V getB()
        Get the second vertex of the request
        Returns:
        the second vertex of the request
      • getLca

        public V getLca()
        Get the least common ancestor
        Returns:
        the least common ancestor
      • setLca

        void setLca​(V lca)