java.lang.Object
de.bsommerfeld.pathetic.api.pathing.processing.Cost

public final class Cost extends Object
Represents a cost value used in pathfinding. This class ensures that cost values can be handled consistently.
  • Field Details

    • ZERO

      public static final Cost ZERO
      A shared instance for zero cost.
  • Method Details

    • getValue

      public double getValue()
      Returns the numerical cost value.
      Returns:
      The cost value.
    • of

      public static Cost of(double value)
      Factory method to create a Cost instance.
      Parameters:
      value - The numerical cost.
      Returns:
      A new Cost instance.
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object