Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 24, 2017
1 parent c1b005c commit e110485
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ new UpperText("Hello");
To filter a collection:

```java
Collection<String> filtered = new IterableAsCollection(
Collection<String> filtered = new IterableAsCollection<>(
new FilteredIterable<>(
new ArrayAsIterable("hello", "world", "dude"),
new Function<String, Boolean>() {
new ArrayAsIterable<>("hello", "world", "dude"),
new Func<String, Boolean>() {
@Override
public boolean apply(String i) {
return i.length() > 4;
Expand All @@ -121,9 +121,9 @@ Collection<String> filtered = new IterableAsCollection(
With Lambda:

```java
new IterableAsCollection(
new IterableAsCollection<>(
new FilteredIterable<>(
new ArrayAsIterable("hello", "world", "dude"),
new ArrayAsIterable<>("hello", "world", "dude"),
i -> i.length() > 4
)
);
Expand All @@ -133,8 +133,8 @@ To iterate a collection:

```java
new Loop(
new TransformedIterable(
new ArrayAsIterable("how", "are", "you"),
new TransformedIterable<>(
new ArrayAsIterable<>("how", "are", "you"),
i -> System.out.printf("Item: %s\n", i)
)
).run();
Expand All @@ -144,7 +144,7 @@ To sort a list of words in the file:

```java
List<String> sorted = new SortedList<>(
new IterableAsList(
new IterableAsList<>(
new TextAsLines(
new InputAsText(
new FileAsInput(
Expand Down

0 comments on commit e110485

Please sign in to comment.