https://github.com/javaquery/util
Java Util Library
https://github.com/javaquery/util
collection date file java json list logging map regex set util
Last synced: 5 months ago
JSON representation
Java Util Library
- Host: GitHub
- URL: https://github.com/javaquery/util
- Owner: javaquery
- License: gpl-3.0
- Created: 2021-01-05T03:21:58.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-01-20T10:15:22.000Z (over 1 year ago)
- Last Synced: 2025-01-20T11:24:26.057Z (over 1 year ago)
- Topics: collection, date, file, java, json, list, logging, map, regex, set, util
- Language: Java
- Homepage:
- Size: 227 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# JavaQuery Util Library
Welcome to the JavaQuery util library
[](https://maven-badges.herokuapp.com/maven-central/com.javaquery/util)
# Overview
Goal is to remove repeated boilerplate utility code from your project. This library offers util classes of following
framework and objects.
- Collections: Provides wide range of operation you perform on collection (List, Set and Map) interfaces
like nullOrEmpty(Collection), nonNullNonEmpty(Collection), batches(List source, int
batchSize), etc...
- Files: Provides wide range of operation you perform on java.io.File like createNewFile(T
file), writeToFile(T file, String data), appendToFile(T file, String data, boolean
appendNewLine), etc...
- Console: Provides replacement of System.out.println() using .log() and
System.err.println() using error().
- JFile: Extends java.io.File and provide some extra function on file like getExtension
, read, write.
- JSONObject: Uses org.json.JSONObject and provides facility to optValue at any path in JSONObject,
like items.item[0].batters.batter[2].available
- Strings: Provides wide range of operation you perform on java.lang.String like nullOrEmpty(
String str), joinStrings(String separator, String... strings),
removeNotSupportedASCIICharacters(String str), etc...
- DatePattern: Provides wide range of Date patterns commonly used worldwide like yyyyMMddHHmmss
, yyyy-MM-dd HH:mm:ss'Z', yyyy-MM-dd'T'HH:mm:ss.SSSSSSS-HH:MM, etc...
- DateRange: Class can be used to store start-date and end-date.
- Dates: Provides wide range of operation you perform on java.util.Date like addInDate(Date
date, int type, int amount), parse(String date, DatePattern datePattern, TimeZone timeZone)
, format(Date date, DatePattern datePattern, TimeZone timeZone), etc...
- Assert: Provides wide range of operation for Assertions like nonNull(Object object, Supplier
exceptionSupplier), isTrue(boolean expression, Supplier exceptionSupplier),
nonNullNonEmpty(Collection> collection, Supplier exceptionSupplier), etc...
- Objects: Provides wide range of operation on java.lang.Object like isNull(Object obj)
, nonNull(Object obj).
- Regex: Provides wide range of operation using regular expression like isNumber(String value)
, isAlphaNumeric(String value), isValidEmail(String value).
- UniqueIdGenerator: Generate unique time based random alphanumeric string like Firebase keys.
- LogBuilder: Help you to build Map for Markers used in logging with optional execution time of code or function.
- JHashMap: Build on top of HashMap. Provide you extra functionality to opt values.
- ExecutionContext: Help you to transfer data between method calls and log extra details.
- CommonResponse: Build common http response object.
# Maven
```
com.javaquery
util
1.2.7
```
# Gradle
```
implementation 'com.javaquery:util:1.2.7'
```