Ignore:
Timestamp:
2016-07-31T14:11:38+02:00 (9 years ago)
Author:
Don-vip
Message:

see #11390, see #12890 - Use Java 8 Function

Location:
trunk/src/org/openstreetmap/josm/tools
Files:
2 edited

Legend:

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

    r10626 r10689  
    1616import java.util.Date;
    1717import java.util.TreeSet;
     18import java.util.function.Function;
    1819import java.util.regex.Matcher;
    1920import java.util.regex.Pattern;
     
    3435import org.openstreetmap.josm.io.OsmTransferException;
    3536import org.openstreetmap.josm.io.auth.CredentialsManager;
    36 import org.openstreetmap.josm.tools.Utils.Function;
    3737import org.openstreetmap.josm.tools.date.DateUtils;
    3838
  • trunk/src/org/openstreetmap/josm/tools/Utils.java

    r10680 r10689  
    770770    @Deprecated
    771771    @FunctionalInterface
    772     public interface Function<A, B> {
     772    public interface Function<A, B> extends java.util.function.Function<A, B> {
    773773
    774774        /**
     
    777777         * @return the transformed object
    778778         */
     779        @Override
    779780        B apply(A x);
    780781    }
     
    789790     * @return the transformed unmodifiable collection
    790791     */
    791     public static <A, B> Collection<B> transform(final Collection<? extends A> c, final Function<A, B> f) {
     792    public static <A, B> Collection<B> transform(final Collection<? extends A> c, final java.util.function.Function<A, B> f) {
    792793        return new AbstractCollection<B>() {
    793794
     
    831832     * @return the transformed unmodifiable list
    832833     */
    833     public static <A, B> List<B> transform(final List<? extends A> l, final Function<A, B> f) {
     834    public static <A, B> List<B> transform(final List<? extends A> l, final java.util.function.Function<A, B> f) {
    834835        return new AbstractList<B>() {
    835836
Note: See TracChangeset for help on using the changeset viewer.