Package org.openrewrite
Interface Validated
- All Known Implementing Classes:
Validated.Both,Validated.Either,Validated.Invalid,Validated.Missing,Validated.None,Validated.Secret,Validated.Valid
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classstatic classstatic classstatic classIndicates that no validation has occurred.static classA specializationValidated.Validthat won't print the secret in plain text if the validation is serialized.static classA valid property value. -
Method Summary
Modifier and TypeMethodDescriptiondefault Validateddefault List<Validated.Invalid>failures()<T> TgetValue()static Validated.Invalidstatic Validated.Invaliddefault booleanbooleanisValid()static Validated.Missingstatic Validated.Nonenone()static Validateddefault Validatedstatic Validatedstatic <T> ValidatedValidate that the Predicate will evaluate to 'true' on the supplied value.static Validated.Validstatic Validated.SecretvalidSecret(String property, String value) Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
isValid
boolean isValid() -
isInvalid
default boolean isInvalid() -
failures
-
validSecret
-
none
-
valid
-
test
Validate that the Predicate will evaluate to 'true' on the supplied value. When the Predicate evaluates to 'false' the error message will be of the form:"[property] was '[value]' but it [message]"
- Type Parameters:
T- The property value type.- Parameters:
property- The property name to testmessage- The failure message if the test doesn't passvalue- The value of the propertytest- The test predicate- Returns:
- A validation result
-
required
-
notBlank
-
missing
-
invalid
-
invalid
-
and
-
or
-
getValue
-