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:
parent
343aa066ae
commit
7c5bec1b48
|
@ -26,11 +26,9 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.StringTokenizer;
|
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.ArrayTernaryTrie;
|
||||||
import org.eclipse.jetty.util.IncludeExclude;
|
|
||||||
import org.eclipse.jetty.util.Predicate;
|
|
||||||
import org.eclipse.jetty.util.Trie;
|
import org.eclipse.jetty.util.Trie;
|
||||||
import org.eclipse.jetty.util.URIUtil;
|
import org.eclipse.jetty.util.URIUtil;
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,7 @@ import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
import java.util.function.Predicate;
|
||||||
import org.eclipse.jetty.util.Predicate;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Set of PathSpec strings.
|
* A Set of PathSpec strings.
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.eclipse.jetty.util;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
|
|
||||||
/** Utility class to maintain a set of inclusions and exclusions.
|
/** Utility class to maintain a set of inclusions and exclusions.
|
||||||
|
|
|
@ -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);
|
|
||||||
}
|
|
|
@ -23,6 +23,7 @@ import java.util.Collections;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
import java.util.function.Predicate;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue