Class RouteMatchingEdge

java.lang.Object
com.massifmaps.routing.RouteMatchingEdge

public class RouteMatchingEdge extends Object
A class that defines a route matching result edge.
  • Constructor Details

    • RouteMatchingEdge

      public RouteMatchingEdge()
      Constructs a new RouteMatchingEdge instance with no attributes.
    • RouteMatchingEdge

      public RouteMatchingEdge(StringVariantMap attributes)
      Constructs a new RouteMatchingEdge from an attributes map.
      Parameters:
      attributes - The attributes map.
  • Method Details

    • equals

      public boolean equals(Object obj)
      Checks if this object is equal to the specified object.
      Overrides:
      equals in class Object
      Parameters:
      obj - The reference object.
      Returns:
      True when objects are equal, false otherwise.
    • hashCode

      public int hashCode()
      Returns the hash value of this object.
      Overrides:
      hashCode in class Object
      Returns:
      The hash value of this object.
    • containsAttribute

      public boolean containsAttribute(String name)
      Returns true if edge contains the specified attribute.
      Parameters:
      name - The name of the attribute to check.
      Returns:
      True if the specified attribute exists in the edge.
    • getAttribute

      public Variant getAttribute(String name)
      Returns the value of the specified attribute.
      Parameters:
      name - The name of the attribute to return.
      Returns:
      The attribute value, if attribute exists. Null variant is returned otherwise.
    • toString

      public String toString()
      Creates a string representation of this object, useful for logging.
      Overrides:
      toString in class Object
      Returns:
      The string representation of this object.