程序包 cn.taketoday.util
package cn.taketoday.util
Useful Tools
- 作者:
- TODAY 2021/3/27 10:45
-
类说明An
IdGeneratorthat usesSecureRandomfor the initial seed andRandomthereafter, instead of callingUUID.randomUUID()every time asJdkIdGeneratordoes.Adapter class for exposing annotations as anAnnotatedElementArrayHolder<E>It is used for the scenario of changing less and reading more frequently.Iterator over an array.A simple utility class for Base64 encoding and decoding.Composite iterator that combines multiple other iterators, as registered viaCompositeIterator.add(Iterator).Support class for throttling concurrent access to a specific resource.ConcurrentCache<K,V> ConcurrentLruCache<K,V> Simple LRU (Least Recently Used) cache, bounded by a specified cache capacity.A single map entry.A reference to anConcurrentReferenceHashMap.Entrycontained in the map.Various reference types supported by this map.The types of restructuring that can be performed.Simple customizable helper class for creating newThreadinstances.A data size, such as '12MB'.A standard set ofDataSizeunits.From hutoolDefault implementation of thePropertiesPersisterinterface.Helper class for invokingClassLoader.defineClass(String, byte[], int, int).Miscellaneous methods for calculating digests.A strategy for handling errors.AnInstanceFilterimplementation that handles exception types.A speedy alternative toByteArrayOutputStream.Simple utility methods for file and stream copying.Utility methods for working with the file system.Contract for generating universally unique identifiers (UUIDs).A simple instance filter that checks if a given instance match based on a collection of includes and excludes element.Instantiator<T>Simple factory used to instantiate objects by injecting available parameters.Callback used to register available parameters.Strategy for handling a failure that occurs when instantiating a type.Exception thrown fromMimeTypeUtils.parseMimeType(String)in case of encountering an invalid content type specification String.AnIdGeneratorthat callsUUID.randomUUID().KeyValueHolder<K,V> An immutable container for a key and a value, suitable for use in creating and populatingMapinstances.Utility that can be used to invoke lambdas in a safe way.LambdaSafe.Callback<C,A> Represents a single callback that can be invoked in a lambda safe way.LambdaSafe.Callbacks<C,A> Represents a collection of callbacks that can be invoked in a lambda safe way.The result of a callback which may be a value,nullor absent entirely if the callback wasn't suitable.LambdaSafe.LambdaSafeCallback<C,A, SELF extends LambdaSafe.LambdaSafeCallback<C, A, SELF>> Abstract base class for lambda safe callbacks.LinkedHashMapvariant that stores String keys in a case-insensitive manner, for example for key-based access in a results table.Utility methods for formatting and logging messages.MapCache<Key,Value, Param> Map cacheA common key class for a method against a specific target class, includingMethodClassKey.toString()representation andComparablesupport (as suggested for customHashMapkeys as of Java 8).Represents a MIME Type, as originally defined in RFC 2046 and subsequently used in other Internet protocols including HTTP.MimeType.SpecificityComparator<T extends MimeType>Comparator to sortMimeTypesin order of specificity.MiscellaneousMimeTypeutility methods.Miscellaneous object utility methods.Strategy interface used to resolve replacement values for placeholders contained in Strings.Strategy interface for persistingjava.util.Properties, allowing for pluggable parsing strategies.Utility that can be used to map values from a supplied source to a destination.A source that is in the process of being mapped.An operation that can be applied to aPropertyMapper.Source.Utility class for working with Strings that have placeholder values in them.Simple utility class for working with the reflection API and handling reflection exceptions.Callback interface invoked on each field in the hierarchy.Callback optionally used to filter fields to be operated on by a field callback.Action to take on each method.Callback optionally used to filter methods to be operated on by a method callback.Helper class that allows for specifying a reflective method to invoke in a declarative fashion, be it static or non-static.An extension ofByteArrayOutputStreamthat: has publicResizableByteArrayOutputStream.grow(int)andResizableByteArrayOutputStream.resize(int)methods to get more control over the size of the internal buffer has a higher initial capacity (256) by defaultContract for matching routes to patterns.A parsed representation of a route.Static utilities for serialization and deserialization using Java Object Serialization.A simpleIdGeneratorthat starts at 1, increments up toLong.MAX_VALUE, and then rolls over.RouteMatcherthat delegates to aPathMatcher.SmartList<E>A List which is optimised for the sizes of 0 and 1, in which cases it would not allocate array at all.Simple stop watch, allowing for timing of a number of tasks, exposing total running time and running time for each named task.Nested class to hold data about one task executed within theStopWatch.Simple utility methods for dealing with streams.Helper class for resolving placeholders in texts.Utility to work with Java 5 generic type parameters.