|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cfpm.caves.za.Group
org.cfpm.caves.za.SavingsClub
org.cfpm.caves.za.Stokvel
public class Stokvel
A stokvel is a savings club with a monthly fee and either a monthly rotation of payouts (ROSCA) or a payout of accumulated savings at the end of a circle (ASCA). For the sake of simplicity, this class implements an ASCA-type stokvel. Thus it's easier to have grace periods like in burial societies.
Field Summary | |
---|---|
(package private) int |
payOutDate
next date (tick) of pay out (depends on number of members) |
(package private) java.util.ArrayList<java.lang.Integer> |
startDates
list of start dates for all members |
Fields inherited from class org.cfpm.caves.za.SavingsClub |
---|
holdings, monthlyFee, onGrace |
Fields inherited from class org.cfpm.caves.za.Group |
---|
memberIDs, members, model, name, pcs |
Constructor Summary | |
---|---|
Stokvel(java.util.ArrayList<Person> members,
SouthAfricaModel model)
Creates a new stokvel for the given members |
Method Summary | |
---|---|
void |
addMember(Person p)
lets the given person join this stokvel |
void |
disband()
disbands this stokvel |
int |
getPayOutDate()
returns the next payout date |
int[] |
getStartDates()
returns the start dates of all members |
double[] |
payOut()
pay out accumulated savings to the members |
void |
removeMember(Person p)
lets the given person leave this stokvel |
private void |
reset()
internal function: resets all variables for the start of a new cycle |
void |
setPayOutDate(int date)
sets the next payout date |
Methods inherited from class org.cfpm.caves.za.SavingsClub |
---|
getGracePeriods, getHoldings, getMembersOnGrace, getMonthlyFee, payIn, requestGracePeriod, setHoldings, setMonthlyFee |
Methods inherited from class org.cfpm.caves.za.Group |
---|
addPropertyChangeListener, getMemberIDs, getName, removePropertyChangeListener, setMemberIDs, setName, setName, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
java.util.ArrayList<java.lang.Integer> startDates
int payOutDate
Constructor Detail |
---|
public Stokvel(java.util.ArrayList<Person> members, SouthAfricaModel model)
members
- list of membersmodel
- the modelMethod Detail |
---|
public void addMember(Person p)
addMember
in class Group
p
- the new memberpublic void removeMember(Person p)
removeMember
in class SavingsClub
p
- the leaving memberpublic double[] payOut()
private void reset()
public int getPayOutDate()
public void setPayOutDate(int date)
date
- date of next payoutpublic int[] getStartDates()
public void disband()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |