Class Filters


  • public final class Filters
    extends java.lang.Object
    This utility class provides common EventFilter instances
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static @NotNull EventFilter all​(@NotNull java.util.List<EventFilter> filters)
      A filter that matches if and only if all of the filters passed to this method matches.
      static @NotNull EventFilter all​(@NotNull EventFilter... filters)
      A filter that matches if and only if all of the filters passed to this method matches.
      static @NotNull EventFilter any​(@NotNull java.util.List<EventFilter> filters)
      A filter that matches if and only if any of the filters passed to this method matches.
      static @NotNull EventFilter any​(@NotNull EventFilter... filters)
      A filter that matches if and only if any of the filters passed to this method matches.
      static @NotNull EventFilter excludeAll()  
      static @NotNull EventFilter includeAll()  
      static @NotNull EventFilter not​(@NotNull EventFilter filter)
      A filter that matches if and only if any the filter passed to this method does not match.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • not

        @NotNull
        public static @NotNull EventFilter not​(@NotNull
                                               @NotNull EventFilter filter)
        A filter that matches if and only if any the filter passed to this method does not match.
        Parameters:
        filter - filter which must not match
        Returns:
        true if filter does not match.
      • any

        @NotNull
        public static @NotNull EventFilter any​(@NotNull
                                               @NotNull EventFilter... filters)
        A filter that matches if and only if any of the filters passed to this method matches.
        Parameters:
        filters - filters of which any must match
        Returns:
        true if any of filters match.
      • all

        @NotNull
        public static @NotNull EventFilter all​(@NotNull
                                               @NotNull EventFilter... filters)
        A filter that matches if and only if all of the filters passed to this method matches.
        Parameters:
        filters - filters of which all must match
        Returns:
        true if all of filters match.
      • includeAll

        @NotNull
        public static @NotNull EventFilter includeAll()
        Returns:
        Filter that includes everything
      • excludeAll

        @NotNull
        public static @NotNull EventFilter excludeAll()
        Returns:
        Filter that excludes everything
      • any

        @NotNull
        public static @NotNull EventFilter any​(@NotNull
                                               @NotNull java.util.List<EventFilter> filters)
        A filter that matches if and only if any of the filters passed to this method matches.
        Parameters:
        filters - filters of which any must match
        Returns:
        true if any of filters match.
      • all

        @NotNull
        public static @NotNull EventFilter all​(@NotNull
                                               @NotNull java.util.List<EventFilter> filters)
        A filter that matches if and only if all of the filters passed to this method matches.
        Parameters:
        filters - filters of which all must match
        Returns:
        true if all of filters match.