Interface UsbDevicePredicate

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 UsbDevicePredicate
Represents a predicate (boolean-valued function) of one argument, evaluated for a given USB device.

This is a functional interface whose functional method is matches(UsbDevice).

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(@NotNull UsbDevice device)
    Evaluates this predicate on the given USB device.
    static boolean
    matchesAny(@NotNull UsbDevice device, @NotNull List<UsbDevicePredicate> predicates)
    Test if the USB devices matches any of the filter conditions.
  • Method Details

    • matches

      boolean matches(@NotNull @NotNull UsbDevice device)
      Evaluates this predicate on the given USB device.
      Parameters:
      device - the USB device
      Returns:
      true of the devices matches the predicate, otherwise false
    • matchesAny

      static boolean matchesAny(@NotNull @NotNull UsbDevice device, @NotNull @NotNull List<UsbDevicePredicate> predicates)
      Test if the USB devices matches any of the filter conditions.
      Parameters:
      device - the USB device
      predicates - a list of filter predicates
      Returns:
      true if it matches, false otherwise