src/share/classes/java/nio/file/DirectoryStream.java
Print this page
@@ -1,7 +1,7 @@
/*
- * 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.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -115,12 +115,11 @@
*
* @see Files#newDirectoryStream(Path)
*/
public interface DirectoryStream<T>
- extends Closeable, Iterable<T>
-{
+ extends Closeable, Iterable<T> {
/**
* 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
* parameter to the {@link Files#newDirectoryStream(Path,DirectoryStream.Filter)}
* method when opening a directory to iterate over the entries in the
@@ -128,10 +127,11 @@
*
* @param <T> the type of the directory entry
*
* @since 1.7
*/
+ @FunctionalInterface
public static interface Filter<T> {
/**
* Decides if the given directory entry should be accepted or filtered.
*
* @param entry