Ignore:
Timestamp:
2016-07-21T02:15:38+02:00 (8 years ago)
Author:
Don-vip
Message:

see #11390, fix #12908 - Java 8: Move to java Predicates (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r10570 r10582  
    5858import java.util.regex.Matcher;
    5959import java.util.regex.Pattern;
     60import java.util.stream.Stream;
    6061import java.util.zip.GZIPInputStream;
    6162import java.util.zip.ZipEntry;
     
    105106    /**
    106107     * Tests whether {@code predicate} applies to at least one element from {@code collection}.
     108     * <p>
     109     * Note: you can use {@link Stream#anyMatch(java.util.function.Predicate)} instead.
    107110     * @param <T> type of items
    108111     * @param collection the collection
     
    121124    /**
    122125     * Tests whether {@code predicate} applies to all elements from {@code collection}.
     126     * <p>
     127     * Note: you can use {@link Stream#allMatch(java.util.function.Predicate)} instead.
    123128     * @param <T> type of items
    124129     * @param collection the collection
     
    175180     * @param predicate The predicate to filter for.
    176181     * @return The new {@link FilteredCollection}
    177      */
     182     * @deprecated Use java predicates and {@link SubclassFilteredCollection#filter(Collection, java.util.function.Predicate)} instead.
     183     */
     184    @Deprecated
    178185    @SuppressWarnings("unused")
    179186    public static <T> Collection<T> filter(Collection<? extends T> collection, Predicate<? super T> predicate) {
     
    798805     * @param <A> class of input objects
    799806     * @param <B> class of transformed objects
    800      */
     807     *
     808     * @deprecated Use java.util.function.Function instead.
     809     */
     810    @Deprecated
    801811    public interface Function<A, B> {
    802812
Note: See TracChangeset for help on using the changeset viewer.