|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--mil.af.afit.router.RestrictedOperatingZoneList
This maintains a list of rozs and allows interested objects to listen
for changes by implementing the Observer
interface.
RestrictedOperatingZone
,
Observer
, Serialized FormConstructor Summary | |
RestrictedOperatingZoneList()
Constructs an empty roz list |
Method Summary | |
void |
addROZ(RestrictedOperatingZone roz)
Adds a single roz to the end of the roz list and notifies registered Observer s of the change. |
void |
addROZs(RestrictedOperatingZone[] moreRestrictedOperatingZones)
Adds the array of rozs to the end of the roz list and notifies registered Observer s of the change. |
RestrictedOperatingZone[] |
getROZs()
Returns an array of the rozs in the list. |
void |
removeRestrictedOperatingZone(RestrictedOperatingZone roz)
Removes a roz by checking roz == rozs[i] for
each roz in the list and notifies registered Observer s
of the change |
void |
removeRestrictedOperatingZoneAt(int index)
Removes a roz at a particular index and notifies registered Observer s of the change. |
void |
removeRestrictedOperatingZonesAt(int[] indeces)
Removes rozs at the specified indeces and notifies registered Observer s of the change. |
void |
replace(RestrictedOperatingZoneList newList)
Replaces this list with newList . |
java.lang.String |
toString()
|
void |
update(java.util.Observable thing,
java.lang.Object arg)
Called when an Observable registers a change. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public RestrictedOperatingZoneList()
Method Detail |
public final void addROZs(RestrictedOperatingZone[] moreRestrictedOperatingZones)
Observer
s of the change.moreRestrictedOperatingZones
- array of rozs to add to listRestrictedOperatingZone
,
Observer
public final void addROZ(RestrictedOperatingZone roz)
Observer
s of the change.roz
- roz to add to listRestrictedOperatingZone
,
Observer
public final void removeRestrictedOperatingZoneAt(int index)
Observer
s of the change.index
- index of roz to removeRestrictedOperatingZone
,
Observer
public final void removeRestrictedOperatingZone(RestrictedOperatingZone roz)
roz == rozs[i]
for
each roz in the list and notifies registered Observer
s
of the changeroz
- roz to removeRestrictedOperatingZone
,
Observer
public final void removeRestrictedOperatingZonesAt(int[] indeces)
Observer
s of the change.roz
- roz to removeRestrictedOperatingZone
,
Observer
public final RestrictedOperatingZone[] getROZs()
public java.lang.String toString()
toString
in class java.lang.Object
public final void update(java.util.Observable thing, java.lang.Object arg)
Observable
registers a change. The
list registers with rozs. The list then notifies its own
registered Observer
s of the change.update
in interface java.util.Observer
thing
- thing that was updatedarg
- argument passed by thingObservable
,
Observer
public final void replace(RestrictedOperatingZoneList newList)
newList
. This is used
when loading a new Kernel
. Observer
s
registered with the original list will still be registered, but
anything registered with newList
will not still
be registered.newList
- the new roz list to use
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |