Interface IAllowedValue

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 Details

    • of

      @NonNull static IAllowedValue of(@NonNull String value, @NonNull MarkupLine description, @Nullable String deprecatedVersion)
      Construct a new allowed value entry for use in an IAllowedValuesConstraint.
      Parameters:
      value - the allowed value
      description - a textual description of the value
      deprecatedVersion - the version this value was deprecated in
      Returns:
      the new allowed value
    • getValue

      @NonNull String 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 null if the value is not deprecated
    • getDescription

      @NonNull MarkupLine getDescription()
      Retrieves the enumerated value's description associated with this allowed value constraint entry.
      Returns:
      the description