Package adams.flow.core
Class FlowContextUtils
- java.lang.Object
-
- adams.flow.core.FlowContextUtils
-
public class FlowContextUtils extends Object
Helper class for flow contexts.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FlowContextUtils.LocatorObserver
Observer for locating any FlowContextHandler instances.static class
FlowContextUtils.UpdateObserver
Observer that updates the context.
-
Constructor Summary
Constructors Constructor Description FlowContextUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isHandler(Object obj)
Returns whether the object or one of the object's children is a FlowContextHandler.static int
update(Object obj, Actor context)
Updates the flow context recursively in the object and its children.
-
-
-
Method Detail
-
update
public static int update(Object obj, Actor context)
Updates the flow context recursively in the object and its children.- Parameters:
obj
- the object to updatecontext
- the context to set- Returns:
- the number of contexts updated
-
isHandler
public static boolean isHandler(Object obj)
Returns whether the object or one of the object's children is a FlowContextHandler.- Parameters:
obj
- the object to check- Returns:
- true if a handler
-
-