Package elki.utilities
Class HandlerList<H>
- java.lang.Object
-
- elki.utilities.HandlerList<H>
-
- Type Parameters:
H- Parent class/interface for all handlers
public final class HandlerList<H> extends java.lang.ObjectManages a list of handlers for objects. Handlers are appended to a list in sequence, and when querying, the last added handler will be used where the query object can be cast to the handlers restriction class.- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description HandlerList()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HgetHandler(java.lang.Object o)Find a matching handler for the given objectvoidinsertHandler(java.lang.Class<?> restrictionClass, H handler)Insert a handler to the beginning of the stack.
-
-
-
Method Detail
-
insertHandler
public void insertHandler(java.lang.Class<?> restrictionClass, H handler)Insert a handler to the beginning of the stack.- Parameters:
restrictionClass- restriction classhandler- handler
-
getHandler
public H getHandler(java.lang.Object o)
Find a matching handler for the given object- Parameters:
o- object to find handler for- Returns:
- handler for the object. null if no handler was found.
-
-