- All Known Implementing Classes:
dev.metaschema.databind.model.metaschema.impl.AbstractAllowedValue,ConstraintValueEnum
public interface IAllowedValue
Represents an individual enumerated value associated with an
IAllowedValuesConstraint.
These values are part of a collection of values in an
IAllowedValuesConstraint.
-
Method Summary
Modifier and TypeMethodDescriptionIf the value is deprecated, get the deprecated version.Retrieves the enumerated value's description associated with this allowed value constraint entry.getValue()Retrieves the enumerated value associated with this allowed value constraint entry.static IAllowedValueof(String value, MarkupLine description, String deprecatedVersion) Construct a new allowed value entry for use in anIAllowedValuesConstraint.
-
Method Details
-
of
@NonNull static IAllowedValue of(@NonNull String value, @NonNull MarkupLine description, @Nullable String deprecatedVersion) Construct a new allowed value entry for use in anIAllowedValuesConstraint.- Parameters:
value- the allowed valuedescription- a textual description of the valuedeprecatedVersion- the version this value was deprecated in- Returns:
- the new allowed value
-
getValue
Retrieves the enumerated value associated with this allowed value constraint entry.- Returns:
- the value
-
getDeprecatedVersion
String getDeprecatedVersion()If the value is deprecated, get the deprecated version.- Returns:
- the deprecated version or
nullif the value is not deprecated
-
getDescription
Retrieves the enumerated value's description associated with this allowed value constraint entry.- Returns:
- the description
-