Update iterator readme
This commit is contained in:
parent
1f6833986e
commit
86362e12f6
@ -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
|
||||
@ -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);
|
||||
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user