public class ValidationResults extends Object
ValidationResult objects.| Modifier and Type | Method and Description |
|---|---|
static ValidationResult |
createInvalid(String errorDescription)
Creates an invalid
ValidationResult that contains an error
description. |
static ValidationResult |
createInvalid(String errorDescriptionTemplate,
Object... arguments)
Works just like
createInvalid(String) but accepts a template string
with placeholders "{}" that are substituted with the given arguments. |
static ValidationResult |
createValid()
Creates a valid
ValidationResult, which is a ValidationResult
that contains no errors. |
public static ValidationResult createInvalid(String errorDescription)
ValidationResult that contains an error
description.errorDescription - the error description.ValidationResult containing an error description.public static ValidationResult createInvalid(String errorDescriptionTemplate, Object... arguments)
createInvalid(String) but accepts a template string
with placeholders "{}" that are substituted with the given arguments. Works
like described in MessageFormatter.
For example,
MessageFormatter.format("Hi {}.", "there");
will return the string "Hi there.".
errorDescriptionTemplate - the description as template used to create the error description.arguments - the arguments that are filled inside the description template.ValidationResult containing one error description.public static ValidationResult createValid()
ValidationResult, which is a ValidationResult
that contains no errors.Copyright © 2024. All rights reserved.