Package adams.flow.core.actorfilter
Class SuperclassOrInterface
- java.lang.Object
-
- adams.flow.core.actorfilter.SuperclassOrInterface
-
- All Implemented Interfaces:
ActorFilter
,Serializable
public class SuperclassOrInterface extends Object implements ActorFilter
Accepts actor classes that either implement the interface(s) or are derived from the superclass(es).- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SuperclassOrInterface(Class cls)
For checking against a single class only.SuperclassOrInterface(Class[] classes)
For checking against a multiple classes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
accept(Actor actor)
Returns whether the actor should be kept.
-
-
-
Constructor Detail
-
SuperclassOrInterface
public SuperclassOrInterface(Class cls)
For checking against a single class only.- Parameters:
cls
- the class (superclass, interface) to check against
-
SuperclassOrInterface
public SuperclassOrInterface(Class[] classes)
For checking against a multiple classes.- Parameters:
classes
- the classes (superclasses, interfaces) to check against
-
-
Method Detail
-
accept
public boolean accept(Actor actor)
Returns whether the actor should be kept.- Specified by:
accept
in interfaceActorFilter
- Parameters:
actor
- the actor to check- Returns:
- true if the actor class is in the specified list of classes
-
-