Skip to content

Commit

Permalink
(yegor256#1246) Updated README documentation: Add the description abo…
Browse files Browse the repository at this point in the history
…ut SetOf
  • Loading branch information
fanifieiev committed Nov 26, 2019
1 parent 95f5a04 commit 7870427
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,33 @@ int total = new LengthOf(
).intValue();
```

To get unique elements in a collection:

```java
final Set<String> unique = new SetOf<String>(
"one",
"two",
"one",
"three"
);
```

To get unique elements of existing iterable:
```java
final Set<String> words = new SetOf<>(
new IterableOf<>("abc", "bcd", "abc", "ccc")
);
```

To ge sorted unique iterable of existing iterable:
```java
final Iterable<String> sorted = new Sorted<>(
new SetOf<>(
new IterableOf<>("abc", "bcd", "abc", "ccc")
)
);
```

## Funcs and Procs

This is a traditional `foreach` loop:
Expand Down

0 comments on commit 7870427

Please sign in to comment.