Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update iterator readme
  • Loading branch information
iluwatar committed Jun 20, 2021
commit 86362e12f6a3554820984f1b6c08f38f5b6759bc
8 changes: 4 additions & 4 deletions iterator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ underlying representation.

## Explanation

Real world example
Real-world example

> Treasure chest contains a set of magical items. There multiple types of items such as rings,
> potions and weapons. The items can be browsed by type using an iterator the treasure chest
> potions, and weapons. The items can be browsed by type using an iterator the treasure chest
> provides.

In plain words
Expand Down Expand Up @@ -113,7 +113,7 @@ public interface Iterator<T> {
}
```

In the following example we iterate through the ring type items found in the chest.
In the following example, we iterate through the ring-type items found in the chest.

```java
var itemIterator = TREASURE_CHEST.iterator(ItemType.RING);
Expand Down Expand Up @@ -145,7 +145,7 @@ Use the Iterator pattern

* [How to Use Iterator?](http://www.tutorialspoint.com/java/java_using_iterator.htm)

## Real world examples
## Known uses

* [java.util.Iterator](http://docs.oracle.com/javase/8/docs/api/java/util/Iterator.html)
* [java.util.Enumeration](http://docs.oracle.com/javase/8/docs/api/java/util/Enumeration.html)
Expand Down