equal
deleted
inserted
replaced
114 static <T> Predicate<T> isEqual(Object targetRef) { |
114 static <T> Predicate<T> isEqual(Object targetRef) { |
115 return (null == targetRef) |
115 return (null == targetRef) |
116 ? Objects::isNull |
116 ? Objects::isNull |
117 : object -> targetRef.equals(object); |
117 : object -> targetRef.equals(object); |
118 } |
118 } |
|
119 |
|
120 /** |
|
121 * Returns a predicate that is the negation of the supplied predicate. |
|
122 * |
|
123 * @param <T> the type of arguments to the specified predicate |
|
124 * @param target predicate to negate |
|
125 * |
|
126 * @return a predicate that negates the results of the supplied |
|
127 * predicate |
|
128 * |
|
129 * @since 11 |
|
130 */ |
|
131 @SuppressWarnings("unchecked") |
|
132 static <T> Predicate<T> not(Predicate<? super T> target) { |
|
133 return (Predicate<T>)target.negate(); |
|
134 } |
119 } |
135 } |