Class AbstractGenerationState.AllowedValueCollection

java.lang.Object
dev.metaschema.schemagen.AbstractGenerationState.AllowedValueCollection
Enclosing class:
AbstractGenerationState<WRITER,DATATYPE_MANAGER extends dev.metaschema.schemagen.datatype.IDatatypeManager>

public static class AbstractGenerationState.AllowedValueCollection extends Object
Represents a collection of allowed values with a flag indicating whether the value set is closed (no other values allowed) or open.
  • Constructor Details

    • AllowedValueCollection

      public AllowedValueCollection(boolean closed, @NonNull List<IAllowedValue> values)
      Construct a new allowed value collection.
      Parameters:
      closed - true if only the specified values are allowed, false if other values are also permitted
      values - the list of allowed values
  • Method Details

    • isClosed

      public boolean isClosed()
      Determine if the allowed value set is closed.
      Returns:
      true if only the specified values are allowed, false if other values are also permitted
    • getValues

      @NonNull public List<IAllowedValue> getValues()
      Get the list of allowed values.
      Returns:
      an unmodifiable list of allowed values