类 ConsumerGoods

java.lang.Object
org.coodex.billing.box.ConsumerGoods
所有已实现的接口:
Adjustment<Chargeable>, Revision

public class ConsumerGoods extends Object implements Adjustment<Chargeable>
消费品
  • 构造器详细资料

    • ConsumerGoods

      public ConsumerGoods(int price, float quantity, String name)
      参数:
      price - 单价
      quantity - 数量
      name - 名称
  • 方法详细资料

    • adjust

      public long adjust(Bill<Chargeable> bill)
      指定者:
      adjust 在接口中 Adjustment<Chargeable>
      参数:
      bill - 待调整的账单
      返回:
      调整金额,整数调增,负数调减,为0则表示不调整
    • getName

      public String getName()
      指定者:
      getName 在接口中 Revision
      返回:
      调减项名称
    • getPrice

      public int getPrice()
    • getQuantity

      public float getQuantity()