Public Member Functions | |
WorkContract (@NotNull Firm pEmployer,@AssertFieldConstraints("amount") double pAmount) | |
The WorkContract constructor. | |
Package Types | |
enum | Status |
The status of this work contract. More... | |
Private Member Functions | |
boolean | isValidAmount (double pAmountToTest) |
The fraction of working time that the Household uses for the job of this contract. | |
Private Attributes | |
Status | status = Status.OFFERED |
The status of this work contract. | |
final Firm | employer |
The employer of this WorkContract. | |
Classes | |
class | WageComparator |
This Comparator is used to sort work contracts in dependency of the wage. |
Definition at line 33 of file WorkContract.java.
enum Status [package] |
The status of this work contract.
The work contract is set to OFFERED before the household checks the conditions in Household.checkOfferedWorkContract. The Household sets the status to REJECTED or ACCEPTED. The household can ask the firm for a WorkContract as a form of speculative application, if the firm doesn't have a job for the household, the status is set to NO_OFFER.
Definition at line 41 of file WorkContract.java.
WorkContract | ( | @NotNull Firm | pEmployer, | |
@AssertFieldConstraints("amount") double | pAmount | |||
) |
The WorkContract constructor.
pAmount | The WorkContract.amount of work declared in this contract. |
Definition at line 109 of file WorkContract.java.
00110 { 00111 employer = pEmployer; 00112 amount = pAmount; 00113 }
boolean isValidAmount | ( | double | pAmountToTest | ) | [private] |
The fraction of working time that the Household uses for the job of this contract.
The sum of the amounts of all WorkContracts of one Household is a value between 0 <= amount <= 1.
Definition at line 90 of file WorkContract.java.
00090 { 00091 if (status == Status.ACCEPTED) { 00092 return ((amount > 0.d) && (amount <= 1.d)); 00093 } else { 00094 return (amount >= 0.d); 00095 } 00096 }
The status of this work contract.
The work contract is set to OFFERED before the household checks the conditions in Household.checkOfferedWorkContract. The Household sets the status to REJECTED or ACCEPTED.
Definition at line 77 of file WorkContract.java.
Referenced by WorkContract.isValidAmount().
The employer of this WorkContract.
Definition at line 83 of file WorkContract.java.
Referenced by WorkContract.WorkContract().