LibJ Util provides Java API Extensions to java.util
.
Java's java.util
package provides a wide range of utility classes, yet many common patterns are left for developers to implement themselves. To bridge the gap, LibJ Util complements Java's standard utility classes with implementations of such patterns.
-
Primitive Collections
An implementation of the Java's Collections API for primitive types, replicating Java's Collection API as closely as possible.
-
DataEncoding
An abstraction of data encoding, with implementations offering:
Base32
andHexadecimal
algorithms. -
Buffers
An implementation of Java's
java.util.BitSet
class expressed as functions that operate onbyte[]
references. -
Bytes
Functions implementing common operations on
byte[]
references. -
Classes
Utility providing implementations of methods missing from the API of
java.lang.Class
. -
CompositeList
A list that is comprised of lists that each maintain elements conforming to a particular criterial or type.
-
ConcurrentHashSet
A concurrent
java.util.HashSet
implementation backed by ajava.util.ConcurrentHashMap
. -
DelegateCollection, DelegateList, DelegateMap, DelegateSet
Implementations of interfaces belonging to Java's Collections API that delegate method calls to a target reference.
-
Diff
An algorithm and encoding (the diff) for the representation of the steps necessary to transform a target string to the source string.
-
Digraph, RefDigraph
A directed graph of an arbitrary-sized set of arbitrary-typed vertices, permitting self-loops and parallel edges.
-
Enums.Mask
A utility class that provides functions to encode and decode
enum
instances to and fromint
orlong
values, whereby the bits of theint
orlong
values represent the ordinal numbers of theenum
instances. -
FastArrays
Utility functions that complement
java.util.Arrays
. -
FastCollections
Utility functions that complement
java.util.Collections
. -
BiMap, HashBiMap
Bidirectional map that maintains both key->value and value->key mappings.
-
Identifiers
Utility functions for checking or creating valid Java Identifiers as defined in JLS 3.8 Identifiers.
-
Numbers.Unsigned
Utility functions to convert between signed and unsigned numbers.
-
ObservableCollection, ObservableList, ObservableMap, ObservableSet
Implementations of interfaces belonging to Java's Collections API that provide callback methods for observation of collection modification events.
-
Repeat
An abstraction of operations that execute recursively or iteratively in order to process collections or arrays (containers), and return statically allocated arrays, the sizes of which are not able to be known until evaluation of each member of the specified container.
-
SortedList
A
java.util.List
that guarantees sorted order of its members. -
StreamSearcher
An efficient stream searching class based on the Knuth-Morris-Pratt algorithm.
-
Strings
Utility functions that provide common operations pertaining to
String
andStringBuilder
. -
TieredRangeFetcher
A "data fetcher" that facilitates the retrieval of data representing information pertaining to a dimension that can be denoted as a "range" (such as time or distance).
-
SynchronizingExecutorService
An
java.util.concurrent.ExecutorService
that allows its threads to be synchronized. -
Retry
An abstraction of conditions and timing of when retries should be performed.
-
ZipFiles
Convenience utility functions for operations pertaining to zip files.
-
and more...
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
This project is licensed under the MIT License - see the LICENSE.txt file for details.