Package username
Class Deduction
java.lang.Object
username.Deduction
- All Implemented Interfaces:
Comparable<Deduction>
Represents a Deduction item that has a type and amount.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
Deduction
Creates a Deduction item that has a type and amount- Parameters:
type
- Type of the deductionamount
- Amount of the deduction
-
-
Method Details
-
getAmount
public double getAmount() -
getType
-
compareTo
Compares two Deduction objects based on their amount.- Specified by:
compareTo
in interfaceComparable<Deduction>
- Parameters:
that
- the object to be compared.- Returns:
- Positive value, zero, or a negative value if the amount for this Deduction is greater than, equal to, or less than the amount of the passed in Deduction that.
-