Skip to content

AhNahhas/WebUtils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebUtils

A utility Java library for a cleaner & simpler code.

Installation

Maven dependency Sonatype Central Repository

Examples

//with webutils 
var iterator = OptionalUtils.ofMappable(collection, Collection::iterator);

//with plain java
var iterator = collection != null ? collection.iterator() : null;
//find mutual objects in both collections 
List<String> listOne = List.of("One", "Two", "Three");
List<String> listTwo = List.of("Three", "Four", "Five");

//contains "Three"
var result = CollectionUtils.innerJoin(listOne, listTwo);          
//filter stream elements using a predicate
Comparator<String> comparator = (a, b) -> StringUtils.compareIgnoreCase(a, b);
var list = stream.filter(StreamUtils.filterDuplicate(comparator))
                 .collect(Collectors.toList());

Contributing

Pull requests are welcome if you want to contribute to this library.

License

MIT

About

Utilities for a clean & efficient java code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages