Interface Filter

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Filter ALL
      A filter to select all elements.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      static Filter and​(Filter... filters)
      Creates a filter that performs a logical AND operation on two or more filters.
      boolean apply​(Pair<NitriteId,​Document> element)
      Applies the filter to the given element.
      static Filter byId​(NitriteId nitriteId)
      Returns a filter that matches documents with the specified NitriteId.
      default Filter not()
      Creates a not filter which performs a logical NOT operation on a filter and selects the documents that do not satisfy the criteria.
      static Filter or​(Filter... filters)
      Creates a filter that performs a logical OR operation on two or more filters.
    • Field Detail

      • ALL

        static final Filter ALL
        A filter to select all elements.
    • Method Detail

      • byId

        static Filter byId​(NitriteId nitriteId)
        Returns a filter that matches documents with the specified NitriteId.

        The returned filter matches documents where the value of the _id field is equal to the specified NitriteId's idValue.

        Parameters:
        nitriteId - the nitrite id
        Returns:
        the filter
      • and

        static Filter and​(Filter... filters)
        Creates a filter that performs a logical AND operation on two or more filters. The returned filter accepts a document if all filters in the list accept the document.
        Parameters:
        filters - the filters to AND together
        Returns:
        the new filter
        Throws:
        FilterException - if less than two filters are specified
      • or

        static Filter or​(Filter... filters)
        Creates a filter that performs a logical OR operation on two or more filters. The returned filter selects all documents that satisfy at least one of the filters in the list.
        Parameters:
        filters - the filters to be combined using the OR operation
        Returns:
        the filter that performs the OR operation on the specified filters
        Throws:
        FilterException - if less than two filters are specified
      • apply

        boolean apply​(Pair<NitriteId,​Document> element)
        Applies the filter to the given element.
        Parameters:
        element - the element to apply the filter to.
        Returns:
        true if the element matches the filter, false otherwise.
      • not

        default Filter not()
        Creates a not filter which performs a logical NOT operation on a filter and selects the documents that do not satisfy the criteria.

        NOTE: This also includes documents that do not contain the value.

        Returns:
        the not filter