Interface Filter<T>

    • Method Detail

      • evaluate

        boolean evaluate​(T o)
        Apply the test to the input argument.
        Parameters:
        o - the input argument to evaluate
        Returns:
        true if the input argument matches the filter, otherwise false
      • toExpression

        default String toExpression()
        Return a string expression for this filter.
        Returns:
        a string expression for this filter
      • and

        default Filter and​(Filter other)
        Return a composed filter that represents a short-circuiting logical AND of this filter and another. When evaluating the composed filter, if this filter is false, then the other filter is not evaluated.

        Any exceptions thrown during evaluation of either filter are relayed to the caller; if evaluation of this filter throws an exception, the other filter will not be evaluated.

        Parameters:
        other - a filter that will be logically-ANDed with this filter
        Returns:
        a composed filter that represents the short-circuiting logical AND of this filter and the other filter
      • or

        default Filter or​(Filter other)
        Return a composed predicate that represents a short-circuiting logical OR of this predicate and another. When evaluating the composed predicate, if this predicate is true, then the other predicate is not evaluated.

        Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, the other predicate will not be evaluated.

        Parameters:
        other - a predicate that will be logically-ORed with this predicate
        Returns:
        a composed predicate that represents the short-circuiting logical OR of this predicate and the other predicate
      • xor

        default Filter xor​(Filter other)
        Return a composed predicate that represents a logical XOR of this predicate and another.

        Any exceptions thrown during evaluation of either predicate are relayed to the caller; if evaluation of this predicate throws an exception, the other predicate will not be evaluated.

        Parameters:
        other - a predicate that will be logically-XORed with this predicate
        Returns:
        a composed predicate that represents the logical XOR of this predicate and the other predicate
      • associatedWith

        default <K> KeyAssociatedFilter<T> associatedWith​(K key)
        Return a key associated filter based on this filter and a specified key.
        Type Parameters:
        K - the key type
        Parameters:
        key - associated key
        Returns:
        a key associated filter
      • forPartitions

        default PartitionedFilter<T> forPartitions​(PartitionSet partitions)
        Return a partitioned filter for a specified partition set.
        Parameters:
        partitions - the set of partitions the filter should run against
        Returns:
        a partitioned filter
      • forKeys

        default <K> InKeySetFilter<T> forKeys​(Set<K> setKeys)
        Return a filter that will only be evaluated within specified key set.
        Type Parameters:
        K - the key type
        Parameters:
        setKeys - the set of keys to limit the filter evaluation to
        Returns:
        a key set-limited filter
      • asLimitFilter

        default LimitFilter<T> asLimitFilter​(int cPageSize)
        Return a limit filter based on this filter.
        Parameters:
        cPageSize - the number of entries per page
        Returns:
        a limit filter