Skip to content

jdereg/java-util

Repository files navigation

java-util

Maven Central Javadoc

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.jarfile is 471K and works with JDK 1.8 through JDK 24. The .jar file classes are version 52 (JDK 1.8)

Compatibility

JPMS (Java Platform Module System)

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.

OSGi

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.

Using in an OSGi Runtime

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.4.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:

Gradle
implementation 'com.cedarsoftware:java-util:3.4.0'
Maven
<dependency>
  <groupId>com.cedarsoftware</groupId>
  <artifactId>java-util</artifactId>
  <version>3.4.0</version>
</dependency>

java-util

Sets

  • 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

Maps

  • 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

Lists

  • ConcurrentList - Thread-safe List implementation with flexible wrapping options

Utilities

Logging

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.

View detailed documentation

See changelog.md for revision history.


By: John DeRegnaucourt and Kenny Partlow

About

Rare, hard-to-write utilities that are thoroughly tested

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 14

Languages