Package adams.flow.core
Class RatHelper
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.flow.core.RatHelper
-
- All Implemented Interfaces:
adams.core.logging.LoggingSupporter
,adams.core.SizeOfHandler
,Serializable
public class RatHelper extends adams.core.logging.LoggingObject
Helper class for Rat actors.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description RatHelper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<adams.flow.core.Actor>
findAllRats(adams.flow.core.Actor flow)
Returns allRats
instances that can be located in the flowadams.flow.core.Actor
findRat(adams.flow.core.ActorHandler group, RatReference name)
Checks a control actor's children whether they contain the rat that we're looking for.adams.flow.core.Actor
findRat(adams.flow.core.Actor root, RatReference name)
Tries to find the rat referenced by its name.adams.flow.core.Actor
findRatRecursive(adams.flow.core.Actor actor, RatReference name)
Tries to find the referenced rat.
-
-
-
Method Detail
-
findRat
public adams.flow.core.Actor findRat(adams.flow.core.ActorHandler group, RatReference name)
Checks a control actor's children whether they contain the rat that we're looking for.- Parameters:
group
- the group to checkname
- the name of the rat- Returns:
- the rat or null if not found
-
findRat
public adams.flow.core.Actor findRat(adams.flow.core.Actor root, RatReference name)
Tries to find the rat referenced by its name.- Parameters:
root
- the root to search inname
- the name of the rat- Returns:
- the rat or null if not found
-
findRatRecursive
public adams.flow.core.Actor findRatRecursive(adams.flow.core.Actor actor, RatReference name)
Tries to find the referenced rat. First all possible actor handlers are located recursively (up to the root) that allow also singletons. This list of actors is then searched for the rat.- Parameters:
actor
- the actor to start fromname
- the name of the rat- Returns:
- the rat or null if not found
- See Also:
ActorUtils.findActorHandlers(Actor, boolean)
-
-