|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jtp.disp.DispatcherUtils
A collection of static utility methods for Dispatchers.
Dispatcher
Constructor Summary | |
DispatcherUtils()
|
Method Summary | |
static boolean |
addToDispatcher(Reasoner r,
Dispatcher tgt)
Adds Reasoner r to Dispatcher tgt
or an appropriate child dispatcher of tgt . |
protected static Collection |
collectReasoners(Dispatcher d,
Dispatcher tgt,
Collection out)
From the children of a given dispatcher d, selects and adds to the provided collection out those reasoners that are acceptable for the target dispatcher tgt. |
protected static List |
findChildDispatchers(Reasoner r0,
Dispatcher tgt,
List out)
For a given dispatcher tgt, finds all children dispatchers that would accept reasoner r0. |
static boolean |
moveChildren(Dispatcher src,
Dispatcher tgt)
Moves reasoners in src that are acceptable
to tgt into tgt . |
static boolean |
removeFromDispatcher(Reasoner r,
Dispatcher tgt)
Removes a reasoner from a dispatcher. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DispatcherUtils()
Method Detail |
public static boolean addToDispatcher(Reasoner r, Dispatcher tgt)
r
to Dispatcher tgt
or an appropriate child dispatcher of tgt
.
In addition, if r
is itself a Dispatcher,
then all Reasoners currently in tgt
that
are acceptable for r
(see
Dispatcher.getReasonerClass()
)
are moved from tgt
to r
.
r
was successfully added to tgt
; false otherwisepublic static boolean moveChildren(Dispatcher src, Dispatcher tgt)
src
that are acceptable
to tgt
into tgt
.
src
to tgt
; false otherwisepublic static boolean removeFromDispatcher(Reasoner r, Dispatcher tgt)
Dispatcher.removeReasoner(jtp.Reasoner)
that only tries to remove reasoners directly
attached to the given dispatcher. Only one occurence is removed.
r
- the reasoner that we want to removetgt
- the dispatcher that we want to remove it from
protected static List findChildDispatchers(Reasoner r0, Dispatcher tgt, List out)
ArrayList
. Dispatchers are arranged in the order of increasing
generality, i.e. most specific first.
protected static Collection collectReasoners(Dispatcher d, Dispatcher tgt, Collection out)
ArrayList
is created.
|
JTP API Documentation | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |