提交 661df508 编写于 作者: D darcy

8005623: Retrofit FunctionalInterface annotations to core platform interfaces

Reviewed-by: mduigou, chegar, alanb
上级 a23eb580
/* /*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,7 +34,7 @@ import java.io.IOException; ...@@ -34,7 +34,7 @@ import java.io.IOException;
* *
* @since 1.5 * @since 1.5
*/ */
@FunctionalInterface
public interface Closeable extends AutoCloseable { public interface Closeable extends AutoCloseable {
/** /**
......
/* /*
* Copyright (c) 1998, 2002, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,6 +35,7 @@ package java.io; ...@@ -35,6 +35,7 @@ package java.io;
* *
* @since 1.2 * @since 1.2
*/ */
@FunctionalInterface
public interface FileFilter { public interface FileFilter {
/** /**
...@@ -46,5 +47,4 @@ public interface FileFilter { ...@@ -46,5 +47,4 @@ public interface FileFilter {
* should be included * should be included
*/ */
boolean accept(File pathname); boolean accept(File pathname);
} }
/* /*
* Copyright (c) 1994, 1998, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -39,8 +39,8 @@ package java.io; ...@@ -39,8 +39,8 @@ package java.io;
* @see java.io.File#list(java.io.FilenameFilter) * @see java.io.File#list(java.io.FilenameFilter)
* @since JDK1.0 * @since JDK1.0
*/ */
public @FunctionalInterface
interface FilenameFilter { public interface FilenameFilter {
/** /**
* Tests if a specified file should be included in a file list. * Tests if a specified file should be included in a file list.
* *
......
/* /*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,7 +34,7 @@ import java.io.IOException; ...@@ -34,7 +34,7 @@ import java.io.IOException;
* *
* @since 1.5 * @since 1.5
*/ */
@FunctionalInterface
public interface Flushable { public interface Flushable {
/** /**
......
/* /*
* Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -31,6 +31,7 @@ package java.lang; ...@@ -31,6 +31,7 @@ package java.lang;
* @author Josh Bloch * @author Josh Bloch
* @since 1.7 * @since 1.7
*/ */
@FunctionalInterface
public interface AutoCloseable { public interface AutoCloseable {
/** /**
* Closes this resource, relinquishing any underlying resources. * Closes this resource, relinquishing any underlying resources.
......
/* /*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -93,7 +93,7 @@ import java.util.*; ...@@ -93,7 +93,7 @@ import java.util.*;
* @see java.util.Comparator * @see java.util.Comparator
* @since 1.2 * @since 1.2
*/ */
@FunctionalInterface
public interface Comparable<T> { public interface Comparable<T> {
/** /**
* Compares this object with the specified object for order. Returns a * Compares this object with the specified object for order. Returns a
......
/* /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,6 +35,7 @@ import java.util.Iterator; ...@@ -35,6 +35,7 @@ import java.util.Iterator;
* *
* @since 1.5 * @since 1.5
*/ */
@FunctionalInterface
public interface Iterable<T> { public interface Iterable<T> {
/** /**
......
/* /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,7 +34,7 @@ import java.io.IOException; ...@@ -34,7 +34,7 @@ import java.io.IOException;
* *
* @since 1.5 * @since 1.5
*/ */
@FunctionalInterface
public interface Readable { public interface Readable {
/** /**
...@@ -51,5 +51,4 @@ public interface Readable { ...@@ -51,5 +51,4 @@ public interface Readable {
* @throws java.nio.ReadOnlyBufferException if cb is a read only buffer * @throws java.nio.ReadOnlyBufferException if cb is a read only buffer
*/ */
public int read(java.nio.CharBuffer cb) throws IOException; public int read(java.nio.CharBuffer cb) throws IOException;
} }
/* /*
* Copyright (c) 1994, 2005, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -52,8 +52,8 @@ package java.lang; ...@@ -52,8 +52,8 @@ package java.lang;
* @see java.util.concurrent.Callable * @see java.util.concurrent.Callable
* @since JDK1.0 * @since JDK1.0
*/ */
public @FunctionalInterface
interface Runnable { public interface Runnable {
/** /**
* When an object implementing interface <code>Runnable</code> is used * When an object implementing interface <code>Runnable</code> is used
* to create a thread, starting the thread causes the object's * to create a thread, starting the thread causes the object's
......
/* /*
* Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -1851,6 +1851,7 @@ class Thread implements Runnable { ...@@ -1851,6 +1851,7 @@ class Thread implements Runnable {
* @see ThreadGroup#uncaughtException * @see ThreadGroup#uncaughtException
* @since 1.5 * @since 1.5
*/ */
@FunctionalInterface
public interface UncaughtExceptionHandler { public interface UncaughtExceptionHandler {
/** /**
* Method invoked when the given thread terminates due to the * Method invoked when the given thread terminates due to the
......
/* /*
* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -117,8 +117,7 @@ import java.io.IOException; ...@@ -117,8 +117,7 @@ import java.io.IOException;
*/ */
public interface DirectoryStream<T> public interface DirectoryStream<T>
extends Closeable, Iterable<T> extends Closeable, Iterable<T> {
{
/** /**
* An interface that is implemented by objects that decide if a directory * An interface that is implemented by objects that decide if a directory
* entry should be accepted or filtered. A {@code Filter} is passed as the * entry should be accepted or filtered. A {@code Filter} is passed as the
...@@ -130,6 +129,7 @@ public interface DirectoryStream<T> ...@@ -130,6 +129,7 @@ public interface DirectoryStream<T>
* *
* @since 1.7 * @since 1.7
*/ */
@FunctionalInterface
public static interface Filter<T> { public static interface Filter<T> {
/** /**
* Decides if the given directory entry should be accepted or filtered. * Decides if the given directory entry should be accepted or filtered.
......
/* /*
* Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,7 +34,7 @@ package java.nio.file; ...@@ -34,7 +34,7 @@ package java.nio.file;
* @see FileSystem#getPathMatcher * @see FileSystem#getPathMatcher
* @see Files#newDirectoryStream(Path,String) * @see Files#newDirectoryStream(Path,String)
*/ */
@FunctionalInterface
public interface PathMatcher { public interface PathMatcher {
/** /**
* Tells if given path matches this matcher's pattern. * Tells if given path matches this matcher's pattern.
......
/* /*
* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -98,7 +98,7 @@ package java.util; ...@@ -98,7 +98,7 @@ package java.util;
* @see java.io.Serializable * @see java.io.Serializable
* @since 1.2 * @since 1.2
*/ */
@FunctionalInterface
public interface Comparator<T> { public interface Comparator<T> {
/** /**
* Compares its two arguments for order. Returns a negative integer, * Compares its two arguments for order. Returns a negative integer,
......
/* /*
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface BinaryOperator<T> { public interface BinaryOperator<T> {
/** /**
......
/* /*
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface Block<T> { public interface Block<T> {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,6 +29,7 @@ package java.util.function; ...@@ -29,6 +29,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface DoubleBinaryOperator /* extends BinaryOperator<Double> */ { public interface DoubleBinaryOperator /* extends BinaryOperator<Double> */ {
// //
// @Override // @Override
......
/* /*
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,6 +33,7 @@ package java.util.function; ...@@ -33,6 +33,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface DoubleBlock { public interface DoubleBlock {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface DoubleFunction<T> { public interface DoubleFunction<T> {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface DoubleSupplier { public interface DoubleSupplier {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,6 +30,7 @@ package java.util.function; ...@@ -30,6 +30,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface DoubleUnaryOperator { public interface DoubleUnaryOperator {
/** /**
......
/* /*
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,6 +35,7 @@ package java.util.function; ...@@ -35,6 +35,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface Function<T, R> { public interface Function<T, R> {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,6 +29,7 @@ package java.util.function; ...@@ -29,6 +29,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface IntBinaryOperator { public interface IntBinaryOperator {
/** /**
......
/* /*
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,6 +33,7 @@ package java.util.function; ...@@ -33,6 +33,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface IntBlock { public interface IntBlock {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface IntFunction<T> { public interface IntFunction<T> {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface IntSupplier { public interface IntSupplier {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,6 +29,7 @@ package java.util.function; ...@@ -29,6 +29,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface IntUnaryOperator { public interface IntUnaryOperator {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,6 +29,7 @@ package java.util.function; ...@@ -29,6 +29,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface LongBinaryOperator { public interface LongBinaryOperator {
/** /**
......
/* /*
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,6 +33,7 @@ package java.util.function; ...@@ -33,6 +33,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface LongBlock { public interface LongBlock {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface LongFunction<T> { public interface LongFunction<T> {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface LongSupplier { public interface LongSupplier {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,6 +29,7 @@ package java.util.function; ...@@ -29,6 +29,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface LongUnaryOperator { public interface LongUnaryOperator {
/** /**
......
/* /*
* Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -31,6 +31,7 @@ package java.util.function; ...@@ -31,6 +31,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface Predicate<T> { public interface Predicate<T> {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface Supplier<T> { public interface Supplier<T> {
/** /**
......
/* /*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,6 +32,7 @@ package java.util.function; ...@@ -32,6 +32,7 @@ package java.util.function;
* *
* @since 1.8 * @since 1.8
*/ */
@FunctionalInterface
public interface UnaryOperator<T> { public interface UnaryOperator<T> {
/** /**
......
/* /*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -37,7 +37,7 @@ package java.util.logging; ...@@ -37,7 +37,7 @@ package java.util.logging;
* *
* @since 1.4 * @since 1.4
*/ */
@FunctionalInterface
public interface Filter { public interface Filter {
/** /**
...@@ -46,5 +46,4 @@ public interface Filter { ...@@ -46,5 +46,4 @@ public interface Filter {
* @return true if the log record should be published. * @return true if the log record should be published.
*/ */
public boolean isLoggable(LogRecord record); public boolean isLoggable(LogRecord record);
} }
/* /*
* Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,7 @@ package java.util.prefs; ...@@ -34,6 +34,7 @@ package java.util.prefs;
* @see NodeChangeListener * @see NodeChangeListener
* @since 1.4 * @since 1.4
*/ */
@FunctionalInterface
public interface PreferenceChangeListener extends java.util.EventListener { public interface PreferenceChangeListener extends java.util.EventListener {
/** /**
* This method gets called when a preference is added, removed or when * This method gets called when a preference is added, removed or when
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册