## model
Class Discount

    java.lang.Object
      model.Discount

    public class Discount

extends java.lang.Object

Class for defining tournament discounts.

Nested Class Summary
`static class` `Discount.DiscountComparator`

Field Summary
`private java.math.BigDecimal` `amount`
`private ID` `DISCOUNT_ID`
`private boolean` `dominant`
`private java.lang.String` `name`

Constructor Summary
`protected` `Discount(ID discount_id, java.lang.String discountname, java.math.BigDecimal discountamount, boolean dominantdiscount)` Constructor.

Method Summary
`boolean` `equals(java.lang.Object other)` Checks whether discount equals to given discount.
`java.math.BigDecimal` `getAmount()` Returns discount amount.
`ID` `getId()` Returns discount id.
`java.lang.String` `getName()` Returns discount name.
`int` `hashCode()` Returns a key for a hash map.
`boolean` `isDominant()` Checks whether discount is dominant.
`java.lang.String` `toString()` Returns discount contents in a formatted string.

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### name

    private final transient java.lang.String name

### amount

    private final transient java.math.BigDecimal amount

### dominant

    private final transient boolean dominant

### DISCOUNT_ID

    private final transient ID DISCOUNT_ID

Constructor Detail

### Discount

    protected Discount(ID discount_id,
                       java.lang.String discountname,
                       java.math.BigDecimal discountamount,
                       boolean dominantdiscount)

  Constructor.

  Parameters:
    `discount_id` - discount id
    `discountname` - discount name
    `discountamount` - amount of money the discount reducesF
    `dominantdiscount` - dominant discount flag

Method Detail

### getId

    public ID getId()

  Returns discount id.

  Returns:
    discount id

### getName

    public java.lang.String getName()

  Returns discount name.

  Returns:
    discount name

### getAmount

    public java.math.BigDecimal getAmount()

  Returns discount amount.

  Returns:
    discount amount

### isDominant

    public boolean isDominant()

  Checks whether discount is dominant.

  Returns:
    true if discount is dominant, otherwise false

### equals

    public boolean equals(java.lang.Object other)

  Checks whether discount equals to given discount.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `other` - discount instance to compare to

### hashCode

    public int hashCode()

  Returns a key for a hash map.

  Overrides:
    `hashCode` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Returns discount contents in a formatted string.

  Overrides:
    `toString` in class `java.lang.Object`