public class WordStat extends Object
| Constructor and Description |
|---|
WordStat() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(String[] args) |
void |
printJavax(@NotNull Path path) |
void |
printWord(Map<String,Integer> stats,
Writer writer,
Predicate<Map.Entry<String,Integer>> filter) |
Map<String,Integer> |
statJavaxUtf8(@NotNull Path path) |
Map<String,Integer> |
statPath(@NotNull Path path,
Charset encoding,
@NotNull Pattern regexp,
@NotNull Function<BufferedReader,Map<String,Integer>> counter)
Recursive statistics including English words within 2-20 characters
|
Map<String,Integer> |
statWord(@NotNull BufferedReader br) |
void |
statWord(Map<String,Integer> map,
String line) |
public void printJavax(@NotNull
@NotNull Path path)
public void printWord(Map<String,Integer> stats, Writer writer, Predicate<Map.Entry<String,Integer>> filter)
public Map<String,Integer> statPath(@NotNull @NotNull Path path, Charset encoding, @NotNull @NotNull Pattern regexp, @NotNull @NotNull Function<BufferedReader,Map<String,Integer>> counter)
path - starting pathencoding - StandardCharsets.UTF_8regexp - matched filescounter - counter methodpublic Map<String,Integer> statWord(@NotNull @NotNull BufferedReader br)
public static void main(String[] args)
Copyright © 2023. All rights reserved.