Class PortalEventFilters

    • Method Detail

      • all

        public static IPortalEventFilter all()
        Returns an event filter that accepts all events.
        Returns:
        an event filter that accepts all events.
        Since:
        4.1.0
      • byClasses

        public static IPortalEventFilter byClasses​(Class<?>... classes)
        Returns an event filter that accepts only events of any of the specified classes. Events must be exactly of the given classes, subclasses are not accepted. To also accept subclasses, use byInstanceOf(Class...) instead.
        Parameters:
        classes - the classes.
        Returns:
        the event filter.
        Since:
        4.1.0
      • byInstanceOf

        public static IPortalEventFilter byInstanceOf​(Class<?>... classes)
        Returns an event filter that accepts events that are instance of any the specified classes. The filter will accept events of the given classes or their subclasses.
        Parameters:
        classes - the classes.
        Returns:
        the event filter.
        Since:
        4.1.0
        See Also:
        byClasses(Class...)
      • byGroups

        public static IPortalEventFilter byGroups​(String... groups)
        Returns an event filter that accepts only event that contain any of the specified groups as its group.
        Parameters:
        groups - the groups.
        Returns:
        the event filter.
        Since:
        4.1.0
      • or

        public static IPortalEventFilter or​(IPortalEventFilter... filters)
        Returns an event filter that accepts any event that any of the given filters would accept. This represents a logical OR operation.
        Parameters:
        filters - the filters.
        Returns:
        the event filter.
        Since:
        4.1.0
      • and

        public static IPortalEventFilter and​(IPortalEventFilter... filters)
        Returns an event filter that accepts only events that all of the given filters would accept. This represents a logical AND operation.
        Parameters:
        filters - the filters.
        Returns:
        the event filter.
        Since:
        4.1.0
      • not

        public static IPortalEventFilter not​(IPortalEventFilter filter)
        Returns an event filter that accepts only events that the given filter would not accept. This represents a logical NOT operation.
        Parameters:
        filter - the filter.
        Returns:
        the event filter.
        Since:
        4.1.0