Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
loganathan-sekaran authored Jan 15, 2018
1 parent 173d822 commit 02c6f8c
Showing 1 changed file with 27 additions and 11 deletions.
38 changes: 27 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,30 @@

This library is a set of Java Utility containing many useful Helper Classes which are described below.

##Stream Util
#Stream Util
<br>
This library contains the StreamUtil, that contains flatten methods to flatten any stream of optionals to the stream of the type contained in the optionals. These flatten methods also supports boxed and non-boxed types of streams.

##Optional Util
#Optional Util
<br>
This library contains the OptionalUtil, that flattens any optional of optional of any type to an optional of the type. Optional of a non-boxed optional type can also be flattened.

##Optional with Throwable
#Optional with Throwable
<br>
A new OptionalWithThrowable is added so that any map/flatMap/filter/ifPresent operation will accept the corresponding 'Funtional Interface with Throwable' which are added in this Java Utlitity.

##Funtional Interfaces with Throwable
#Funtional Interfaces with Throwable
<br>
With regular Functional Interfaces, exceptions or errors are be not able chain the exceptions thrown inside the method to the caller. This required to handle the exception within the method definition itself. To handle this requirement new kind of Funtional Interfaces namely PredicateWithThrowable, FuntionWithThrowable, ConsumerWithThrowable and BiFunctionWithThrowable are added. Some of these are also used with OptionalWithThrowable implementation.

##Tuples
#Tuples
<br>
Inspired by Scala Tuples, this Java Utility includes convinent Generic Tuples from Tuple2 to Tuple10 and a convinient helper factory called Tuples to create them.

##Mappable Optionals
#Mappable Optionals
<br>
This library contains Mappable counterparts of OptionalInt, OptionalLong and OptionalDouble. This Mappable versions allows us to avoid boxing of primitive data typed streams. This implementation is done because the current versions of OptionalInt, OptionalLong and OptionalDouble do not provide a map or flatMap method, which forces us to use the Boxed verison of Optional.

##Examples
Added an example project that demonstrates the use of this Library.

Also, please look into the <a href="https://github.com/loganathan001/Java-Utils/tree/master/projects/java-utils/src/test/java/org/vishag/javautils">Unit tests</a> for all the use-cases and examples.

To install the latest version, add the below pom dependency entry:
```
<dependency>
Expand All @@ -41,3 +42,18 @@ To install the latest version, add the below pom dependency entry:
 <version>1.0.0</version>
</dependency>
```

#Examples
<br>
Added an example project that demonstrates the use of this Library.

To install the examples, add the below pom dependency entry:
```
<dependency>
 <groupId>org.vishag</groupId>
<artifactId>java-utils-examples</artifactId>
 <version>1.0.0</version>
</dependency>
```

Also, please look into the <a href="https://github.com/loganathan001/Java-Utils/tree/master/projects/java-utils/src/test/java/org/vishag/javautils">Unit tests</a> for all the use-cases and examples.

0 comments on commit 02c6f8c

Please sign in to comment.