Skip to content

Utility methods & helping classes for Java development

License

Notifications You must be signed in to change notification settings

HijackerMax/utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Utils GitHub CI Status Maven Central

A set of utils that can help in app development

Prerequisites

  • Java 11+

License

Licensed under the Apache 2.0 License

Geographical utils

  • Mercator(EPSG:3857) to WSG84 convertor
  • WSG84 to Mercator(EPSG:3857) convertor
  • Distance calculation between two WSG84 points

Collector utils

  • Collectors for Java streams

Collections utils

  • Null-safe methods to work with collections

Optional utils

  • Optional providers for different situations

Functional utils

  • Functional utility methods

String Utils

  • Null-safe methods to work with Strings

Object utils

  • Methods that can help work with objects

Boolean utils

  • Methods that can help work with booleans

Date utils

  • Methods that can help work with dates

Math utils

  • Methods that can help with computations

Number utils

  • Methods that can help with numbers

Random utils

  • Methods that can provide some random values or randomize arrays

Functional interfaces

  • TriConsumer
  • TriFunction
  • TriPredicate
  • QuadConsumer
  • QuadFunction
  • QuadPredicate

Wrappers

  • Single
  • Tuple
  • Triple

Builders

  • List builder
  • Set builder
  • Map builder
  • Transformer
  • XBuilder

IO

TemporaryFile
  • Closeable wrapper for temporary files that can be used with try-with-resources

Encoders / decoders

Base32
  • Binary-to-text encoding. Based on charset variant of Douglas Crockford, without check
Base58
  • Binary-to-text encoding. Character set includes all uppercase and lowercase letters except for "0", "O", "I", and "l" to improve human readability.
Base85
  • Binary-to-text encoding. Resulting data is ~25% bigger than source, while base64 is typically ~33%. Description can be found here
Base122
  • Binary-to-text encoding inspired by idea and JS library of Kevin Albertson. Resulting data is ~13% bigger than source, while base64 is typically ~33%

How to use it

Just add this to your pom.xml

<dependency>
    <groupId>com.hijackermax</groupId>
    <artifactId>utils</artifactId>
  <version>0.1.3</version>
</dependency>