A collection of high-performance Java utilities designed to enhance standard Java functionality. These utilities focus on:
- Memory efficiency and performance optimization
- Thread-safety and concurrent operations
- Enhanced collection implementations
- Simplified common programming tasks
- Deep object graph operations
Available on Maven Central.
This library has no dependencies on other libraries for runtime.
The.jar
file is 485K
and works with JDK 1.8
through JDK 24
.
The .jar
file classes are version 52 (JDK 1.8)
As of version 3.5.0 the library is built with the -parameters
compiler flag. Parameter names are now retained for tasks such as
constructor discovery (increased the jar size by about 10K.)
This library is fully compatible with JPMS, commonly known as Java Modules. It includes a module-info.class
file that
specifies module dependencies and exports.
This library also supports OSGi environments. It comes with pre-configured OSGi metadata in the MANIFEST.MF
file, ensuring easy integration into any OSGi-based application.
The jar already ships with all necessary OSGi headers and a module-info.class
. No Import-Package
entries for java.*
packages are required when consuming the bundle.
To add the bundle to an Eclipse feature or any OSGi runtime simply reference it:
<plugin id="com.cedarsoftware.java-util" version="3.5.0"/>
Both of these features ensure that our library can be seamlessly integrated into modular Java applications, providing robust dependency management and encapsulation.
To include in your project:
implementation 'com.cedarsoftware:java-util:3.5.0'
<dependency>
<groupId>com.cedarsoftware</groupId>
<artifactId>java-util</artifactId>
<version>3.5.0</version>
</dependency>
- CompactSet - Memory-efficient Set that dynamically adapts its storage structure based on size
- CaseInsensitiveSet - Set implementation with case-insensitive String handling
- ConcurrentSet - Thread-safe Set supporting null elements
- ConcurrentNavigableSetNullSafe - Thread-safe NavigableSet supporting null elements
- ClassValueSet - High-performance Set optimized for fast Class membership testing using JVM-optimized ClassValue
- CompactMap - Memory-efficient Map that dynamically adapts its storage structure based on size
- CaseInsensitiveMap - Map implementation with case-insensitive String keys
- LRUCache - Thread-safe Least Recently Used cache with configurable eviction strategies
- TTLCache - Thread-safe Time-To-Live cache with optional size limits
- TrackingMap - Map that monitors key access patterns for optimization
- ConcurrentHashMapNullSafe - Thread-safe HashMap supporting null keys and values
- ConcurrentNavigableMapNullSafe - Thread-safe NavigableMap supporting null keys and values
- ClassValueMap - High-performance Map optimized for fast Class key lookups using JVM-optimized ClassValue
- ConcurrentList - Thread-safe List implementation with flexible wrapping options
- ArrayUtilities - Comprehensive array manipulation operations
- ByteUtilities - Byte array and hexadecimal conversion utilities
- ClassUtilities - Class relationship and reflection helper methods
- Converter - Robust type conversion system
- DateUtilities - Advanced date parsing and manipulation
- DeepEquals - Recursive object graph comparison
- EncryptionUtilities - Simplified encryption and checksum operations
- Executor - Streamlined system command execution
- GraphComparator - Object graph difference detection and synchronization
- IOUtilities - Enhanced I/O operations and streaming utilities
- MathUtilities - Extended mathematical operations
- ReflectionUtils - Optimized reflection operations
- StringUtilities - Extended String manipulation operations
- SystemUtilities - System and environment interaction utilities
- Traverser - Configurable object graph traversal
- TypeUtilities - Advanced Java type introspection and generic resolution utilities
- UniqueIdGenerator - Distributed-safe unique identifier generation
Because java-util
has no dependencies on other libraries, java-util
uses the Java built-in java.util.logging
for all output. See the
user guide for ways to route
these logs to SLF4J or Log4j 2.
See changelog.md for revision history.
By: John DeRegnaucourt and Kenny Partlow