|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmodel.Discount
public class Discount
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 |
|---|
private final transient java.lang.String name
private final transient java.math.BigDecimal amount
private final transient boolean dominant
private final transient ID DISCOUNT_ID
| Constructor Detail |
|---|
protected Discount(ID discount_id,
java.lang.String discountname,
java.math.BigDecimal discountamount,
boolean dominantdiscount)
discount_id - discount iddiscountname - discount namediscountamount - amount of money the discount reducesFdominantdiscount - dominant discount flag| Method Detail |
|---|
public ID getId()
public java.lang.String getName()
public java.math.BigDecimal getAmount()
public boolean isDominant()
public boolean equals(java.lang.Object other)
equals in class java.lang.Objectother - discount instance to compare topublic int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||