<commit_before>jcommon
=======
Common utils, abstractions and tools that I use in my projects. They make Java pleasant.

##YCollections
**yk.jcommon.collections**

Collections as they should be.

Example 1
```java
    String names = al(new File("/home/user/").listFiles())
            .filter(File::isDirectory)                  //only dirs
            .map(File::getName)                         //get name
            .filter(n -> n.startsWith("."))             //only invisible
            .sorted()                                   //sorted
            .foldLeft("", (r, n) -> r + ", " + n);      //to print fine
    System.out.println(names);
```
Example 2
```java
    YList<String> all = al("shift", "ctrl", "alt", "super");
    System.out.println(all.shuffle(all)
            .map(p -> p.toSet().toList().sorted().toString())
            .toSet().toList().sorted().toString("\n"));
```
Gives result:
```
[alt, ctrl]
[alt, shift]
[alt, super]
[alt]
[ctrl, shift]
[ctrl, super]
[ctrl]
[shift, super]
[shift]
[super]
```

* each collection extends standard java collection, so you can use it whenever standard collection would else be used
* just added some functional not modifying methods
* yes, there are copies everywhere, but hey! Optimize it when your profiler says you so!
* very convenient
* resulting code is looking like Xtend's or Scala's but with pure java
* java8's .stream() I consider not usable

There was more code here, but it has been move to [yincubator]()

## mvn artifact
```xml
<repository>
   <id>yk.jcommon</id>
   <url>https://github.com/kravchik/mvn-repo/raw/master</url>
</repository>

<dependency>
    <groupId>yk</groupId>
    <artifactId>jcommon</artifactId>
    <version>0.121</version>
</dependency><commit_msg>* text<commit_after>jcommon
=======
Common utils, abstractions, and tools that I use in my projects. They make Java pleasant.

## YCollections
**yk.jcommon.collections**

Collections as they should be.

Example 1
```java
    String names = al(new File("/home/user/").listFiles())
            .filter(File::isDirectory)                  //only dirs
            .map(File::getName)                         //get name
            .filter(n -> n.startsWith("."))             //only invisible
            .sorted()                                   //sorted
            .foldLeft("", (r, n) -> r + ", " + n);      //to print fine
    System.out.println(names);
```
Example 2
```java
    YList<String> all = al("shift", "ctrl", "alt", "super");
    System.out.println(all.shuffle(all)
            .map(p -> p.toSet().toList().sorted().toString())
            .toSet().toList().sorted().toString("\n"));
```
Gives result:
```
[alt, ctrl]
[alt, shift]
[alt, super]
[alt]
[ctrl, shift]
[ctrl, super]
[ctrl]
[shift, super]
[shift]
[super]
```

* each collection extends standard java collection, so you can use it whenever standard collection would else be used
* just added some functional not modifying methods
* yes, there are copies everywhere, but hey! Optimize it when your profiler says you so!
* very convenient
* resulting code is looking like Xtend's or Scala's but with pure java
* java8's .stream() I consider not usable

There was more code here but it has been moved to [yincubator]()

## mvn artifact
```xml
<repository>
   <id>yk.jcommon</id>
   <url>https://github.com/kravchik/mvn-repo/raw/master</url>
</repository>

<dependency>
    <groupId>yk</groupId>
    <artifactId>jcommon</artifactId>
    <version>0.121</version>
</dependency>
{'fraction_non_alphanumeric': 0.15259089607787002, 'fraction_numerical': 0.004008016032064128, 'mean_word_length': 2.744908896034298, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 39, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1906507', 'n_tokens_mistral': 1105, 'n_tokens_neox': 1048, 'n_words': 332}