Package org.threadly.util
This package contains general and simple utilities that are used throughout the code.
-
Interface Summary Interface Description ExceptionHandler Interface for implementation to handle exceptions which occur.Service A service is defined as something which is constructed in a stopped state (unless the constructor starts the service automatically). -
Class Summary Class Description AbstractService An abstract implementation of theService
interface.ArrayIterator<T> Implementation ofIterator
which will go over an Object array.Clock This is a utility class for low-resolution timing which avoids frequentSystem.currentTimeMillis()
calls (which perform poorly because they require system calls).ExceptionUtils Utilities for doing basic operations with exceptions.MutablePair<L,R> A special type ofPair
which allows the stored references to be updated after creation.Pair<L,R> A simple tuple implementation (every library needs one, right?).SortUtils A collection of utilities for searching and sorting against collections and other data providers.StatisticsUtils Utilities for getting some basic statistics out of numerical data collections.StringBufferWriter Class to wrap aStringBuffer
to implement theWriter
interface.StringBuilderWriter Class to wrap aStringBuilder
to implement theWriter
interface.StringUtils Some small utilities and constants around handling strings. -
Exception Summary Exception Description ExceptionUtils.TransformedException Exception which is constructed fromExceptionUtils.makeRuntime(Throwable)
when the exception was not a runtime exception.ExceptionUtils.TransformedSuppressedStackException Exception which is constructed fromExceptionUtils.makeRuntime(Throwable, boolean)
when the exception was not a runtime exception, and stack is being suppressed.StackSuppressedRuntimeException Type ofRuntimeException
which does not generate a stack at it's point of creation.