public class Observing extends Object
Modifier and Type | Method and Description |
---|---|
static void |
cleanUp()
stop and remove all observers and their registered events
|
static void |
clearEvents()
the event list is purged
|
static ObserveEvent |
getEvent(String name)
retrieves and removes the requested event
|
static ObserveEvent[] |
getEvents()
return all events (they are preserved)
|
static ObserveEvent[] |
getEvents(Region reg)
return the events for that region
events are removed from the list |
static boolean |
hasEvent(String name)
are their any happened events for the observer having this name?
|
static boolean |
hasEvents()
are their any happened events
|
static boolean |
hasEvents(Region reg)
are their any happened events for this region?
|
static void |
remove(Region reg)
stop and remove all observers registered for this region from the list
events for those observers are removed as well |
static void |
remove(String name)
remove the observer from the list, a region observer will be stopped
events for that observer are removed as well |
void |
setActive(String name)
set the observer with the given name active (checked while observing)
|
void |
setInactive(String name)
set the observer with the given name inactive (not checked while observing)
|
static void |
setStopOnFirstEvent()
tell the next starting observer, to stop on the first event
|
public static void setStopOnFirstEvent()
public void setInactive(String name)
name
- public void setActive(String name)
name
- public static void remove(String name)
name
- name of observerpublic static void remove(Region reg)
reg
- public static void cleanUp()
public static boolean hasEvents()
public static boolean hasEvents(Region reg)
reg
- public static boolean hasEvent(String name)
name
- public static ObserveEvent[] getEvents(Region reg)
reg
- public static ObserveEvent[] getEvents()
public static ObserveEvent getEvent(String name)
name
- of eventpublic static void clearEvents()
Copyright © 2017. All rights reserved.