public final class TemplateFormatUtil extends Object
TemplateValueFormat-s.| Modifier and Type | Method and Description |
|---|---|
static void |
checkHasNoParameters(String params) |
static Date |
getNonNullDate(TemplateDateModel dateModel)
Utility method to extract the
Date from an TemplateDateModel, and throw
TemplateModelException with a standard error message if that's null. |
static Number |
getNonNullNumber(TemplateNumberModel numberModel)
Utility method to extract the
Number from an TemplateNumberModel, and throws
TemplateModelException with a standard error message if that's null. |
public static void checkHasNoParameters(String params) throws InvalidFormatParametersException
InvalidFormatParametersExceptionpublic static Number getNonNullNumber(TemplateNumberModel numberModel) throws TemplateModelException, UnformattableValueException
Number from an TemplateNumberModel, and throws
TemplateModelException with a standard error message if that's null. TemplateNumberModel
that store null are in principle not allowed, and so are considered to be bugs in the
ObjectWrapper or TemplateNumberModel implementation.public static Date getNonNullDate(TemplateDateModel dateModel) throws TemplateModelException
Date from an TemplateDateModel, and throw
TemplateModelException with a standard error message if that's null. TemplateDateModel
that store null are in principle not allowed, and so are considered to be bugs in the
ObjectWrapper or TemplateNumberModel implementation.TemplateModelException