@Override public boolean test(K t) { return matches(t); }
/** * Creates a {@link Selector} based on the given object. * * @param obj * The object to use for matching * * @return The new {@link ObjectSelector}. * * @see ObjectSelector */ public static <T> Selector<T> object(T obj) { return new ObjectSelector<T, T>(obj); }
/** * Helper method to create a {@link Selector} from the given object. * * @param obj * The object to wrap. * @param <T> * The type of the object. * * @return The new {@link Selector}. */ public static <T> Selector<T> objectSelector(T obj) { return new ObjectSelector<T, T>(obj); }
@Override protected Object clone() throws CloneNotSupportedException { return new ObjectSelector<K, T>(object); }