Package com.complexible.common.base
This package defines a set of classes primarily working with Java core objects or other basic operations. Many
are a supplement to what is found in Guava.
-
Interface Summary Interface Description AutoDisposable A special kind ofDisposable
that keeps track of references to it and disposes the object automatically when there are no references left.ChangeType The type of aChange
.CloseableIterator<T> AnIterator
which can beclosed
.Copyable<T extends Copyable<T>> Interface for an object that can be copied.Disposable ADisposable
is an object data that can be disposed once it is not needed anymore.HandlerBackedIterator.DataConsumer<T> HandlerBackedIterator.DataProducer<T> IOFunction<T,R> Function which performs I/O which declares throwing IOExceptionOptionFunction Progress Read-Only interface for progress info.ProgressMonitor.ProgressFormatter ProgressReporter Interface for progress reportingSizeFunction<T> An interface for computing (typically approximate) size of a specific kind of object.Streams.CheckedBiConsumer<U,T> Streams.CheckedBiFunction<In1,In2,Out> Streams.CheckedConsumer<T> Streams.CheckedFunction<In,Out> Streams.CheckedPredicate<T> Streams.CheckedRunnable Streams.CheckedSupplier<Out> -
Class Summary Class Description AbstractAutoDisposable ActiveResources ArbitrarySortedMapComparator<K extends java.lang.Comparable<? super K>,V extends java.lang.Comparable<? super V>> Comparator to order sorted maps.AtomicState<S extends java.lang.Enum<S>> Represents a mutable state that can be updated exclusively throughAtomicState.beginTransitionFrom(Enum[])
andAtomicState.endTransition()
calls.AutoCloser This class is an equivalent of Guava'sCloser
, that supportsAutoCloseable
s.Change<E extends java.lang.Enum & ChangeType,T> Class which represents a logical change to a resource.ChangeList<E extends java.lang.Enum & ChangeType,T> An ordered list ofchanges
to some resource.CloseableIterator.AbstractCloseableIterator<T> CloseableIterator.DelegatingCloseableIterator<T> CloseableIterator.EmptyCloseableIterator<T> Copyables Utility methods for copying collections ofCopyable
objects.DataKey<E> DataMap An object that maps keys to values in a type-safe manner.Dates Utility methods for working with the Date objectDateTime Immutable representation of date time.Disposables Disposer Utility for tracking and massDisposable.dispose()
ofDisposable
resources.Duration Immutable representation of a duration.Durations Exceptions FormattingResourceBundle Simple extension toResourceBundle
that handles message formatting viaMessageFormat
for values in the resource bundle.Functional Functional utilitiesHandlerBackedIterator<T> An adapter for converting push-based data processing (aka handler-based) to pull-based data processing (aka iterator-based).ImmutableCollectors Instrumentor Simple -javaagent compatible instrumentor.Maths Math-related utilsMemory Utility class for memory related information.Numbers Objects2 Object utilities not provided byObjects
.Option<V> Represents a configuration option.Options OSUtil OSUtil.NativeMemoryUsage Native memory usage info collected from OS.Pair<K1,K2> Tuple with 2 elementsProgress.Default Immutable default implementation of a progressProgressMonitor A multi-thread safe progress monitor implementation that prints progress percent and elapsed time at specified percent increments.ProgressMonitor.Builder Builder class for a customizable progress monitorProgressMonitor.DefaultProgressFormatter ProgressMonitor.DelegatingProgressMonitor ProgressMonitor.ReportingProgressMonitor Chain more than one monitor / reporterPropertiesBuilder Simple builder class for creating instances ofProperties
Reflect A series of basic Reflect based utility functions.ReportInterval A utility class to help with reporting progress at predefined intervals.ReportIntervalCounter A report interval extension that also handles tracking progress.Resources2 SizeFunctions Implementation of size computation for commonly used object types.Sorter<T> This class performs merge sort over an array but allocates the additional array used in merge sort upfront so if the arrays of same size will be sorted repeatedly this sorter can be reused to minimize garbage collection with the price of having memory for extra array always being used.Sorter.QuickSorter<T> Sorter implementation for QuickSort.Streams Utility for streamsStrings2 String utilities not provided byStrings
.SystemUtil Utility methods for working withSystem
, particularly safe, default value supported lookups intoSystem.getProperty(java.lang.String)
and other OS/system level calls. -
Enum Summary Enum Description Bool Three-valued (true, false, unknown) boolean type. -
Exception Summary Exception Description HandlerBackedIterator.ProducerFinished Can be thrown out ofConsumer.accept(Object)
to indicate that theproducer
must stop generating data.Streams.UncheckedException Exception indicating that Checked* threw an exception and the default handler was used