Interface ActionFilter

All Superinterfaces:
Predicate<Action>

@NonExtendable public interface ActionFilter extends Predicate<Action>
A predicate filter which matches certain Actions.

API users should not implement this interface directly.

Since:
5.5
  • Method Details

    • any

      static ActionFilter any()
      Gets an ActionFilter which matches any action.
      Returns:
      the matcher
    • source

      static ActionFilter source(UUID uniqueId)
      Gets an ActionFilter which matches actions with a specific source user.
      Parameters:
      uniqueId - the source user unique id
      Returns:
      the matcher
    • user

      static ActionFilter user(UUID uniqueId)
      Gets an ActionFilter which matches actions which target a specific user.
      Parameters:
      uniqueId - the target user unique id
      Returns:
      the matcher
    • group

      static ActionFilter group(String name)
      Gets an ActionFilter which matches actions which target a specific group.
      Parameters:
      name - the target group name
      Returns:
      the matcher
    • track

      static ActionFilter track(String name)
      Gets an ActionFilter which matches actions which target a specific track.
      Parameters:
      name - the target track name
      Returns:
      the matcher
    • search

      static ActionFilter search(String query)
      Gets an ActionFilter which matches actions which contain a specific search query in the source name, target name or description.
      Parameters:
      query - the search query
      Returns:
      the matcher
    • test

      boolean test(Action action)
      Tests to see if the given Action matches the filter.
      Specified by:
      test in interface Predicate<Action>
      Parameters:
      action - the action to test
      Returns:
      true if the action matched