|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsophware.home.lang.StateObject
sophware.home.lang.BinaryObject
sophware.home.logic.BinaryGroup
public class BinaryGroup
BinaryGroup is a collection of BinaryObject with a policy
that governs the conditions under which the group is considered to be "on"
or "off".
| Field Summary | |
|---|---|
static int |
AND
|
static int |
OR
state change policy |
| Fields inherited from class sophware.home.lang.BinaryObject |
|---|
OFF, ON |
| Constructor Summary | |
|---|---|
BinaryGroup(int policy)
Creates a BinaryGroup with the name and policy. |
|
BinaryGroup(java.lang.String name,
int policy)
Creates a BinaryGroup with the name and policy. |
|
| Method Summary | |
|---|---|
void |
add(BinaryObject obj)
Adds a object to this group |
java.lang.String |
getName()
Gets the group's name |
int |
getPolicy()
Gets the group policy |
boolean |
isMember(BinaryObject obj)
Checks to see if object is in group |
void |
remove(BinaryObject obj)
Removes a object from this group |
void |
stateChanged(StateObject o)
Monitors object in group for state changes |
| Methods inherited from class sophware.home.lang.BinaryObject |
|---|
isOn, setOn, stateEquals |
| Methods inherited from class sophware.home.lang.StateObject |
|---|
addStateChangeListener, fireStateChange, removeStateChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static int OR
public static int AND
| Constructor Detail |
|---|
public BinaryGroup(int policy)
BinaryGroup with the name and policy.
policy - policy governing the state of the group
public BinaryGroup(java.lang.String name,
int policy)
BinaryGroup with the name and policy.
name - name of this grouppolicy - policy governing the state of the group| Method Detail |
|---|
public java.lang.String getName()
getName in interface Namedpublic void add(BinaryObject obj)
obj - the object to be addedpublic void remove(BinaryObject obj)
obj - the object to be removedpublic boolean isMember(BinaryObject obj)
obj - the object to be checkedpublic int getPolicy()
public void stateChanged(StateObject o)
stateChanged in interface StateChangeListenero - object that was updatedStateChangeListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||