Class EventPredicateListener

  • All Implemented Interfaces:
    EventListener

    public class EventPredicateListener
    extends Object
    implements EventListener
    EventPtedicateListener wrappes an EventListener listen to events from input devices only if a predicate is fullfilled.
    Author:
    Christian Paul
    • Constructor Detail

      • EventPredicateListener

        public EventPredicateListener​(EventListener listener,
                                      Predicate<Integer> predicate)
        Instantiates a new EventPredicateListener
        Parameters:
        listener -
        predicate -
    • Method Detail

      • onEvent

        public void onEvent​(Event event)
        Called if input device generates an event
        Specified by:
        onEvent in interface EventListener
        Parameters:
        event - the event from the device