Skip to content

mehmetcc/verifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

verifier

why?

i thought writing a fluent verification library for java would be cool.

how to use?

it's all fluent:

String obj = Verifier.forObject("hehehe")
                .unless(String::isBlank)
                .unless(String::isEmpty)
                .verify();

verifier applies all given predicates and returns the object if verifications passes. throws an unchecked exception otherwise.

alternatively, you can take advantage of java's Optional API.

Optional<String> obj = Verifier.forObject("hehehe")
                .unless(String::isBlank)
                .unless(String::isEmpty)
                .verifyMaybe();

About

fluent verification library for java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages