# Package org.apache.velocity.tools.generic

Contains a collection of reusable, general-purpose "tools" for Velocity.

See: Description

Interface Summary
LoopTool.Condition: Represents a function into which a `LoopTool.ManagedIterator` can pass it's next element to see if an `LoopTool.Action` should be taken.

Class Summary
Alternator: Utility class for easily alternating over values in a list.
AlternatorTool: Deprecated use CSS3 nth-child(even/odd) selectors or #if($foreach.index % 2)
ClassTool: This tool is meant to simplify reflective lookup of information about a `Class` and its `Field`s, `Method`s, and `Constructor`s.
ClassTool.CallableSub<T extends ClassTool.CallableSub>
ClassTool.ConstructorSub: A simplified wrapping interface for inspecting features of a `Constructor` in an inspected Class.
ClassTool.FieldSub: A simplified wrapping interface for inspecting features of a `Field` in an inspected Class.
ClassTool.MethodSub: A simplified wrapping interface for inspecting features of a `Method` in an inspected Class.
ClassTool.Sub<T extends ClassTool.Sub>
CollectionTool: CollectionTool allows a user to sort a collection (or array, iterator, etc) on any arbitrary set of properties exposed by the objects contained within the collection, and to generate arrays by splitting strings.
CollectionTool.PropertiesComparator: Does all of the comparisons
ComparisonDateTool: Tool for comparing `Date` and `Calendar` values in Velocity templates.
ContextTool: Tool for convenient access to `Context` data and meta-data.
ConversionTool: Deprecated use NumberTool for numbers formatting/parsing, DateTool for date/time formatting/parsing, or CollectionTool for toStrings().
DateTool: Tool for working with `Date` and `Calendar` in Velocity templates.
DisplayTool: Provides general utility methods for controlling the display of references.
DisplayTool.Measurements: Measures the dimensions of the string given to its constructor.
EscapeTool: Tool for working with escaping in Velocity templates.
FieldTool: This is a simple tools class to allow easy access to static fields in a class, such as string constants from within a template.
FieldTool.FieldToolSub: Holds a `Map` of results for a particular class.
FormatConfig: Implements common logic and constants for tools which allow their default format to be configured.
ImportSupport: Provides methods to import arbitrary local or remote resources as strings, generic version.
ImportSupport.SafeClosingHttpURLConnectionReader
ImportTool: General-purpose text-importing tool for templates.
JsonContent: Container for *either* an array *or* an object
JsonTool: Tool which can parse a JSON file.
LinkTool: The LinkTool provides many methods to work with URIs and can help you:
LocaleConfig: Implements common logic and constants for tools which allow their default `Locale` to be configured.
LogTool: This tool is used to log from within templates.
LoopTool: A convenience tool to use with #foreach loops.
LoopTool.ActionCondition: Composition class which associates an `LoopTool.Action` and `LoopTool.Condition` for a `LoopTool.ManagedIterator`.
LoopTool.Comparison: Base condition class for conditions (assumption here is that conditions are all comparative.
LoopTool.Equals: Simple condition that checks elements in the iterator for equality to a specified Object.
LoopTool.SyncedIterator: Simple wrapper to make it easy to keep an arbitray Iterator in sync with a `LoopTool.ManagedIterator`.
MarkupTool: NOTE: This tools is considered "alpha" quality due to lack of testing and a generally unpolished API.
MarkupTool.Tag
MathTool: Tool for performing math in Velocity.
NumberTool: Tool for working with `Number` in Velocity templates.
RenderTool: This tool exposes methods to evaluate the given strings as VTL (Velocity Template Language) using either a pre-configured context or one you provide directly.
ResourceTool: Tool for accessing ResourceBundles and formatting messages therein.
SafeConfig: Implements common logic and constants for tools which automatically locks down the `public void configure(Map params)` method after it is called once.
SortTool: Deprecated use CollectionTool sort methods
ValueParser: Utility class for easy parsing of String values held in a Map.
XmlTool: Tool for reading/navigating XML files, with XPath expressions support.
XmlTool.NodeIterator: Iterator implementation that wraps a Node list iterator to return new XmlTool instances for each item in the wrapped iterator.s

Enum Summary
LoopTool.Action: Represents an automatic action taken by a `LoopTool.ManagedIterator` when a `LoopTool.Condition` is satisfied by the subsequent element.

## Package org.apache.velocity.tools.generic Description

Contains a collection of reusable, general-purpose "tools" for Velocity. These tools are independent of the VelocityView classes and may be used in any context.

## Package Specification

## Related Documentation