scranton
Class Guard

java.lang.Object
  extended byscranton.Guard

public class Guard
extends java.lang.Object

Encapsulates a boolean object that may be used in a variety processes to guard against something changing, the guard may be truned on or off to indicate the presence or absence of a application specific conditon.


Field Summary
protected  boolean guard
          The boolean guard that is set on/off to indicate various conditions.
 
Constructor Summary
Guard()
          Constructs a Guard object.
 
Method Summary
 boolean isOff()
          Returns true if the guard is off
 boolean isOn()
          Returns true if the guard is on
 void off()
          Turn the guard off
 void on()
          Turn the guard on
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

guard

protected boolean guard
The boolean guard that is set on/off to indicate various conditions.

Constructor Detail

Guard

public Guard()
Constructs a Guard object.

Method Detail

on

public void on()
Turn the guard on


off

public void off()
Turn the guard off


isOn

public boolean isOn()
Returns true if the guard is on

Returns:
True if the guard is on

isOff

public boolean isOff()
Returns true if the guard is off

Returns:
True if the guard is off