From ac13cb0cc4aa7dbe6213a9dad73d718b7e819ce2 Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Sat, 13 May 2017 19:14:18 +0300 Subject: [PATCH] javadoc --- .../src/com/intellij/util/containers/PeekableIterator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/util/src/com/intellij/util/containers/PeekableIterator.java b/platform/util/src/com/intellij/util/containers/PeekableIterator.java index 563d4ce643e3..780c06cfc112 100644 --- a/platform/util/src/com/intellij/util/containers/PeekableIterator.java +++ b/platform/util/src/com/intellij/util/containers/PeekableIterator.java @@ -20,9 +20,13 @@ import java.util.NoSuchElementException; /** * An iterator with additional ability to {@link #peek()} the current element without moving the cursor. - * Upon creation, {@link #peek()} returns the first element, after {@link #hasNext()} returns false might throw {@link NoSuchElementException}. */ public interface PeekableIterator extends Iterator { + /** + * @return the current element. + * Upon iterator creation should return the first element. + * After {@link #hasNext()} returned false might throw {@link NoSuchElementException}. + */ T peek() throws NoSuchElementException; PeekableIterator EMPTY = new PeekableIterator() {