Interface EventFilter

  • All Superinterfaces:
    java.util.function.Predicate<org.projectnessie.events.api.Event>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface EventFilter
    extends java.util.function.Predicate<org.projectnessie.events.api.Event>
    A filter for events.

    Filters can be combined using and(EventFilter...), or(EventFilter...) and not(EventFilter).

    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static EventFilter all()
      Returns a filter that matches all events.
      static EventFilter and​(EventFilter... filters)
      Returns a filter that matches all events that match all the given filters.
      static EventFilter createdAfter​(java.time.Instant i)
      Returns a filter that matches all events created after the given instant.
      static EventFilter createdBefore​(java.time.Instant i)
      Returns a filter that matches all events created before the given instant.
      static EventFilter hasProperty​(java.lang.String key)
      Returns a filter that matches all events that have a property with the given key.
      static EventFilter hasProperty​(java.lang.String key, java.lang.String value)
      Returns a filter that matches all events that have a property with the given key and value.
      static EventFilter initiatedBy​(java.lang.String username)
      Returns a filter that matches all events initiated by the given username.
      static EventFilter none()
      Returns a filter that matches no events.
      static EventFilter not​(EventFilter filter)
      Returns a filter that matches all events that do not match the given filter.
      static EventFilter or​(EventFilter... filters)
      Returns a filter that matches all events that match at least one of the given filters.
      static EventFilter repositoryId​(java.lang.String id)
      Returns a filter that matches all events that have the given repository id.
      • Methods inherited from interface java.util.function.Predicate

        and, negate, or, test
    • Method Detail

      • all

        static EventFilter all()
        Returns a filter that matches all events.
      • none

        static EventFilter none()
        Returns a filter that matches no events.
      • and

        static EventFilter and​(EventFilter... filters)
        Returns a filter that matches all events that match all the given filters.
      • or

        static EventFilter or​(EventFilter... filters)
        Returns a filter that matches all events that match at least one of the given filters.
      • not

        static EventFilter not​(EventFilter filter)
        Returns a filter that matches all events that do not match the given filter.
      • repositoryId

        static EventFilter repositoryId​(java.lang.String id)
        Returns a filter that matches all events that have the given repository id.
      • createdAfter

        static EventFilter createdAfter​(java.time.Instant i)
        Returns a filter that matches all events created after the given instant.
      • createdBefore

        static EventFilter createdBefore​(java.time.Instant i)
        Returns a filter that matches all events created before the given instant.
      • initiatedBy

        static EventFilter initiatedBy​(java.lang.String username)
        Returns a filter that matches all events initiated by the given username.
      • hasProperty

        static EventFilter hasProperty​(java.lang.String key)
        Returns a filter that matches all events that have a property with the given key.
      • hasProperty

        static EventFilter hasProperty​(java.lang.String key,
                                       java.lang.String value)
        Returns a filter that matches all events that have a property with the given key and value.