Class ItemLines.Line

java.lang.Object
privbot.hooks.container.ItemLines.Line
Enclosing class:
ItemLines

public static final class ItemLines.Line extends Object
One (item, quantity) pair. Items are matched by name only.

The quantity is carried verbatim, including zero and negatives. Clamping belongs to the consumer, because the two disagree about what a zero means: a purchase of zero is meaningless and BuyPlan.Line raises it to 1, while a withdraw of zero is the long-standing way to say "all of it" and WithdrawPlan.Line needs to see it. Clamping here silently turned every x0 withdraw line into x1.

  • Field Details

    • itemName

      public final String itemName
    • quantity

      public final int quantity
  • Constructor Details

    • Line

      public Line(String itemName, int quantity)
  • Method Details