public static <T> Predicate<T> and(final Predicate<? super T> first, final Predicate<? super T> second) {
        return new Predicate<T>() {
            @Override
            public boolean test(final T testValue) {
                return first.test(testValue) && second.test(testValue);
            }
        };
    }
public static < T > Predicate < T > and ( final Predicate < ? super T > first , final Predicate < ? super T > second ) { return new Predicate < T > ( ) { @ Override public boolean test ( final T testValue ) { return first . test ( testValue ) && second . test ( testValue ) ; } } ; }
Create a predicate which is a logical and of two existing predicate.

@param first  first predicate.
@param second second predicate.
@param <T>    type of the predicates
@return resultant predicate
@since 1.5