|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cfpm.caves.za.Church
public class Church
This class represents a church of a particular denomination in a village. We assume that all members of a household are members of the same church, i.e. membership is handled on the household level. Used as shadow fact in Jess.
Field Summary | |
---|---|
jess.Value |
denomination
this church's denomination |
jess.Value[] |
memberIDs
list of member household names (for easier access in Jess) |
(package private) java.util.ArrayList<Household> |
members
the list of households who are members of this church |
jess.Value |
name
this church's name |
private java.beans.PropertyChangeSupport |
pcs
|
Constructor Summary | |
---|---|
Church(java.lang.String nameString,
java.lang.String denominationString,
SouthAfricaModel model)
Creates a new church of the given name and denomination |
Method Summary | |
---|---|
void |
addHousehold(Household h)
Add the household to the ArrayList members<\code> and
replace the memberIDs array of |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener p)
adds a property change listener (for Jess) |
jess.Value |
getDenomination()
returns the denomination of this church |
jess.Value[] |
getMemberIDs()
returns the member IDs |
jess.Value |
getName()
returns the name of this church |
void |
removeHousehold(Household h)
removes the ghiven household from the list of members |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener p)
removes a property change listener (for Jess) |
void |
setMemberIDs(java.util.ArrayList<jess.Value> memberIDsList)
sets the member IDs to the given list of IDs |
void |
setMemberIDs(jess.Value[] memberIDs)
sets the member IDs to the given list of IDs |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.util.ArrayList<Household> members
public jess.Value[] memberIDs
public jess.Value name
public jess.Value denomination
private java.beans.PropertyChangeSupport pcs
Constructor Detail |
---|
public Church(java.lang.String nameString, java.lang.String denominationString, SouthAfricaModel model)
nameString
- the namedenominationString
- the denominationmodel
- the modelMethod Detail |
---|
public void addHousehold(Household h)
ArrayList members<\code> and
replace the memberIDs array of Value<\code> with the
same array extended to include the id of the added household.
- Parameters:
h
- the new member household
public void removeHousehold(Household h)
h
- the household leaving the churchpublic jess.Value[] getMemberIDs()
public void setMemberIDs(jess.Value[] memberIDs)
memberIDs
- list of household IDs as an Array of Valuepublic void setMemberIDs(java.util.ArrayList<jess.Value> memberIDsList)
memberIDsList
- list of household IDs as an ArrayList of Valuepublic jess.Value getName()
public jess.Value getDenomination()
public void addPropertyChangeListener(java.beans.PropertyChangeListener p)
public void removePropertyChangeListener(java.beans.PropertyChangeListener p)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |