import { IMatcher } from "../api/IMatcher" ; import { ObjectHandler } from "./ObjectHandler" ; private export class ObjectProcessor { private _handlers : ObjectHandler [ ] = [ ] ; param matcher param handler public addObjectHandler ( matcher , handler ) { this . _handlers . push ( new ObjectHandler ( matcher , handler ) ) ; } param object public processObject ( object ) { this . _handlers . forEach ( ( handler ) => { handler . handle ( object ) ; } ) ; } /**
     * Removes all handlers
     */ public removeAllHandlers ( ) { this . _handlers = [ ] ; } }