Class Filters

java.lang.Object
com.jme3.network.Filters

public class Filters extends Object
Static utility methods pertaining to Filter instances.
Author:
Paul Speed
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T> Filter<T>
    equalTo(T value)
    Creates a filter that returns true for inputs that are .equals() equivalent to the specified value.
    static <T> Filter<T>
    in(Collection<? extends T> collection)
    Creates a filter that returns true for any value in the specified collection and false for all other cases.
    static <T> Filter<T>
    in(T... values)
    Creates a filter that returns true for any value in the specified list of values and false for all other cases.
    static <T> Filter<T>
    not(Filter<T> f)
    Creates a filter that returns true when the specified delegate filter returns false, and vice versa.
    static <T> Filter<T>
    notEqualTo(T value)
    Creates a filter that returns true for inputs that are NOT .equals() equivalent to the specified value.
    static <T> Filter<T>
    notIn(Collection<? extends T> collection)
    Creates a filter that returns true for any value NOT in the specified collection and false for all other cases.
    static <T> Filter<T>
    notIn(T... values)
    Creates a filter that returns true for any value NOT in the specified list of values and false for all other cases.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • in

      public static <T> Filter<T> in(T... values)
      Creates a filter that returns true for any value in the specified list of values and false for all other cases.
      Type Parameters:
      T - the value type
      Parameters:
      values - the accepted values
      Returns:
      a membership filter for the provided values
    • in

      public static <T> Filter<T> in(Collection<? extends T> collection)
      Creates a filter that returns true for any value in the specified collection and false for all other cases.
      Type Parameters:
      T - the value type
      Parameters:
      collection - the accepted values
      Returns:
      a membership filter for the provided collection
    • notIn

      public static <T> Filter<T> notIn(T... values)
      Creates a filter that returns true for any value NOT in the specified list of values and false for all other cases. This is the equivalent of calling not(in(values)).
      Type Parameters:
      T - the value type
      Parameters:
      values - the rejected values
      Returns:
      a negated membership filter for the provided values
    • notIn

      public static <T> Filter<T> notIn(Collection<? extends T> collection)
      Creates a filter that returns true for any value NOT in the specified collection and false for all other cases. This is the equivalent of calling not(in(collection)).
      Type Parameters:
      T - the value type
      Parameters:
      collection - the rejected values
      Returns:
      a negated membership filter for the provided collection
    • equalTo

      public static <T> Filter<T> equalTo(T value)
      Creates a filter that returns true for inputs that are .equals() equivalent to the specified value.
      Type Parameters:
      T - the value type
      Parameters:
      value - the accepted value
      Returns:
      an equality filter
    • notEqualTo

      public static <T> Filter<T> notEqualTo(T value)
      Creates a filter that returns true for inputs that are NOT .equals() equivalent to the specified value. This is the equivalent of calling not(equalTo(value)).
      Type Parameters:
      T - the value type
      Parameters:
      value - the rejected value
      Returns:
      an inequality filter
    • not

      public static <T> Filter<T> not(Filter<T> f)
      Creates a filter that returns true when the specified delegate filter returns false, and vice versa.
      Type Parameters:
      T - the value type
      Parameters:
      f - the delegate filter
      Returns:
      a negated filter