Class PathPair

java.lang.Object
dev.roanh.cpqindex.PathPair
All Implemented Interfaces:
Comparable<PathPair>

public final class PathPair extends Object implements Comparable<PathPair>
Represents a pair of two labelled paths that were joined to form a new path.
  • Field Details

    • first

      private final LabelledPath first
      The first path of this pair, also the start of the joined path.
    • second

      private final LabelledPath second
      The second path of this pair, also the end of the joined path.
  • Constructor Details

    • PathPair

      public PathPair(LabelledPath first, LabelledPath second)
      Constructs a new path pair with the given paths.
      Parameters:
      first - The first and start path.
      second - The second and end path.
  • Method Details

    • getFirst

      public LabelledPath getFirst()
      Gets the first path in this pair.
      Returns:
      The first path in this pair.
      See Also:
    • getSecond

      public LabelledPath getSecond()
      Gets the second path in this pair.
      Returns:
      The second path in this pair.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • compareTo

      public int compareTo(PathPair o)
      Specified by:
      compareTo in interface Comparable<PathPair>