Interface HelpFilter<S extends Source>

Type Parameters:
S - the source type
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 HelpFilter<S extends Source>
A functional interface for filtering help entries during query operations. Filters are applied during tree traversal to determine which nodes should be included in help results.

Filters can be chained together to create complex filtering logic, such as permission checks, visibility rules, or category filtering.

  • Method Summary

    Modifier and Type
    Method
    Description
    default HelpFilter<S>
    and(HelpFilter<S> other)
    Creates a composite filter that requires both this and another filter to pass.
    boolean
    Determines whether a node should be included in help results.
    default HelpFilter<S>
    Creates a filter that inverts this filter's result.
    default HelpFilter<S>
    or(HelpFilter<S> other)
    Creates a composite filter that passes if either this or another filter passes.
  • Method Details

    • filter

      boolean filter(ParameterNode<S,?> node)
      Determines whether a node should be included in help results.
      Parameters:
      node - the node to evaluate
      Returns:
      true if the node passes the filter and should be included, false if it should be excluded
    • and

      default HelpFilter<S> and(HelpFilter<S> other)
      Creates a composite filter that requires both this and another filter to pass.
      Parameters:
      other - the other filter to combine with
      Returns:
      a new filter that passes only if both filters pass
    • or

      default HelpFilter<S> or(HelpFilter<S> other)
      Creates a composite filter that passes if either this or another filter passes.
      Parameters:
      other - the other filter to combine with
      Returns:
      a new filter that passes if either filter passes
    • negate

      default HelpFilter<S> negate()
      Creates a filter that inverts this filter's result.
      Returns:
      a new filter with inverted logic