Using Java 8 Predicate Function

+ Removing jetty-util (java 7) holdover Predicate.java
+ Converting use to (java 8) java.util.function.Predicate
This commit is contained in:
Joakim Erdfelt 2015-12-17 10:15:57 -07:00
parent 343aa066ae
commit 7c5bec1b48
5 changed files with 4 additions and 36 deletions

View File

@ -26,11 +26,9 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
import java.util.function.BiFunction;
import java.util.function.Predicate;
import org.eclipse.jetty.util.ArrayTernaryTrie;
import org.eclipse.jetty.util.IncludeExclude;
import org.eclipse.jetty.util.Predicate;
import org.eclipse.jetty.util.Trie;
import org.eclipse.jetty.util.URIUtil;

View File

@ -24,8 +24,7 @@ import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;
import org.eclipse.jetty.util.Predicate;
import java.util.function.Predicate;
/**
* A Set of PathSpec strings.

View File

@ -20,6 +20,7 @@ package org.eclipse.jetty.util;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;
/** Utility class to maintain a set of inclusions and exclusions.

View File

@ -1,31 +0,0 @@
//
// ========================================================================
// Copyright (c) 1995-2015 Mort Bay Consulting Pty. Ltd.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//
package org.eclipse.jetty.util;
/**
* Temporary implementation of Java 8's <code>java.util.function.Predicate</code>
* <p>
* To be removed for Java 8 only versions of Jetty.
*
* @param <ITEM> the item to test
*/
public interface Predicate<ITEM>
{
boolean test(ITEM item);
}

View File

@ -23,6 +23,7 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import java.util.function.Predicate;
import java.util.regex.Pattern;
/**