Package org.tentackle.misc
package org.tentackle.misc
Miscellaneous low-level contracts and utilities.
Contains the contracts implemented by the upper layers, such as Identifiable,
Immutable, Snapshotable and Modifiable,
the TrackedList, pooling (Pool), the
CompoundValue, formatting and conversion helpers, and everything else that doesn't fit elsewhere.
-
ClassDescriptionAbstractPool<T extends Poolable<T>>Base implementation of a pool managing
Poolableresources.
It allows min/max sizes, fixed increments, and timeouts for unused and long-used instances.AbstractPoolSlot<T extends Poolable<T>>A slot holding a poolable managed by a pool.
While the poolable is lent, the slot holds only a weak reference to it, so that lent but never returned poolables can be detected viaAbstractPoolSlot.isUnreferenced().Similar toConsumerbut allows checked exceptions.A blocking holder.Utility to canonicalize objects.Properties with defaults for TRIP.Command line arguments and options.A compound value.The value type of strings.Methods related to concurrency and multithreading.Convertible<T>A convertible object.A copy-on-write wrapper for collections.
The first modifying operation creates a clone to leave the original collection untouched.Wrapper for an iterator that forbids invocations of theremove()method.A copy-on-write wrapper for lists.
The first modifying operation creates a clone to leave the original list untouched.Wrapper for a list iterator that forbids modifying method invocations.A copy-on-write wrapper for sets.
The first modifying operation creates a clone to leave the original set untouched.Converts values to or from a string separated by delimiters.
Implements RFC 4180 as well.Utility methods related to thejava.timeAPI.Default properties resource based onFileHelper.
The name is first tried as a file and, if there is no such file, as a classpath resource.Utilities for diagnostic purposes.Formatting helper methods.Patterns to initialize formatting.Holder<T>A generic consumer and supplier to hold some object.
Useful in lambdas if some data has to be set within the enclosing method.Objects that can be identified by an ID.IdentifiableKey<T extends Identifiable>Key for anIdentifiable.
Composed of the class and the ID.IdentifiableMap<T extends Identifiable>A map ofIdentifiables.A tuple holding the ID, serial and name of an object.
There is no further logic.A tuple holding the ID and the serial of an object.
There is no further logic.Objects implementing this interface may be mutable or immutable.Enhanced collection.Runtime exception thrown on an attempt to modify an immutable object.A thread-inheritable thread-local hashtable.Bundle for the misc package in tentackle-core.Interface for objects that can tell whether they are modified or not.Thread-safe named counter.NamedValue<T>Thread-safe named value.Object utility methods.A pool managing poolable resources.A resource that can be managed by aPool.A slot in a pool.Timeout thread to monitorPools.
There is only one such thread for all pools.Loads properties from some resource and applies them to aPropertiesobject.
Implementations must be annotated with @PropertiesResourceService.Annotation forPropertiesResources.Event fired when a property is modified.Listener to track property modifications.Replacement forjava.beans.PropertyChangeSupport, which belongs to thejava.desktopmodule since Java 9.Similar toSupplierbut allows checked exceptions.A scrollable resource.
AScrollableResourceis a wrapper around a resource.A confidential character sequence, such as a password or an access token.Identifiable providing a serial number.A short and a long text.Snapshotable<T>Interface for objects providing the snapshot functionality.A segment of string.
Describes a substring by its indexes within a string.
The substring itself is built lazily, thus allowing index computations without string creations.A duration.Implementation of aTrackedListbased on anArrayList.TrackedList<E>AListwith the ability to tell whether it has been structurally modified.A listener forTrackedListevents.The tentackle directory within the user's home.
Used to cache files, such as preferences, keyrings or downloaded updates.Same asHolder, but with a volatile object reference.
Useful if the object is set and retrieved by different threads.