Parameter

public abstract class Parameter

An abstract representation of a parameter for a message template.

Note that this is implemented as a class (rather than via an interface) because it is very helpful to have explicit checks for the index values and count to ensure we can calculate reliable low bounds for the number of arguments a template can accept.

Note that all subclasses of Parameter must be immutable and thread safe.

Inheritors

Constructors

Link copied to clipboard
protected void Parameter(FormatOptions options, int index)
Constructs a parameter to format an argument using specified formatting options.

Properties

Link copied to clipboard
public final int index

Functions

Link copied to clipboard
protected abstract void accept(ParameterVisitor visitor, Object value)
public final void accept(ParameterVisitor visitor, Array<Object> args)
Link copied to clipboard
public abstract String getFormat()
Returns the printf format string specified for this parameter (eg, "%d" or "%tc").
Link copied to clipboard
protected final FormatOptions getFormatOptions()
Returns the formatting options.
Link copied to clipboard
public final int getIndex()
Returns the index of the argument to be processed by this parameter.