Class AbstractBackLinkWithCost<T extends AbstractBackLinkWithCost<T,C>,C extends Number & Comparable<C>>

java.lang.Object
org.jhotdraw8.graph.path.backlink.AbstractBackLink<T>
org.jhotdraw8.graph.path.backlink.AbstractBackLinkWithCost<T,C>
Type Parameters:
T - the concrete back link type
C - the cost number type
Direct Known Subclasses:
ArcBackLinkWithCost, IndexedVertexBackLinkWithCost, VertexBackLinkWithCost

public class AbstractBackLinkWithCost<T extends AbstractBackLinkWithCost<T,C>,C extends Number & Comparable<C>> extends AbstractBackLink<T>
Abstract base class for back links.
  • Constructor Details

    • AbstractBackLinkWithCost

      public AbstractBackLinkWithCost(@Nullable T parent, @NonNull C cost)
      Creates a new instance.
      Parameters:
      parent - the parent back link
      cost - the cumulated cost of this back link. Must be zero if parent is null.
  • Method Details

    • getCost

      public @NonNull C getCost()
      The cost
      Returns:
      cost