Class ParameterSelection

java.lang.Object
dev.metaschema.oscal.lib.model.ParameterSelection
All Implemented Interfaces:
dev.metaschema.core.model.IBoundObject

@MetaschemaAssembly(formalName="Selection", description="Presenting a choice among alternatives.", name="parameter-selection", moduleClass=OscalControlCommonModule.class, remarks="A set of parameter value choices, that may be picked from to set the parameter value.") public class ParameterSelection extends Object implements dev.metaschema.core.model.IBoundObject
Presenting a choice among alternatives.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new dev.metaschema.oscal.lib.model.ParameterSelection instance with no metadata.
    ParameterSelection(dev.metaschema.core.model.IMetaschemaData data)
    Constructs a new dev.metaschema.oscal.lib.model.ParameterSelection instance with the specified metadata.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    addChoice(dev.metaschema.core.datatype.markup.MarkupLine item)
    Add a new MarkupLine item to the underlying collection.
    List<dev.metaschema.core.datatype.markup.MarkupLine>
    Get the "Choice".
    Get the "Parameter Cardinality".
    dev.metaschema.core.model.IMetaschemaData
     
    boolean
    removeChoice(dev.metaschema.core.datatype.markup.MarkupLine item)
    Remove the first matching MarkupLine item from the underlying collection.
    void
    setChoice(List<dev.metaschema.core.datatype.markup.MarkupLine> value)
    Set the "Choice".
    void
    Set the "Parameter Cardinality".
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ParameterSelection

      Constructs a new dev.metaschema.oscal.lib.model.ParameterSelection instance with no metadata.
    • ParameterSelection

      public ParameterSelection(dev.metaschema.core.model.IMetaschemaData data)
      Constructs a new dev.metaschema.oscal.lib.model.ParameterSelection instance with the specified metadata.
      Parameters:
      data - the metaschema data, or null if none
  • Method Details

    • getMetaschemaData

      public dev.metaschema.core.model.IMetaschemaData getMetaschemaData()
      Specified by:
      getMetaschemaData in interface dev.metaschema.core.model.IBoundObject
    • getHowMany

      @Nullable public String getHowMany()
      Get the "Parameter Cardinality".

      Describes the number of selections that must occur. Without this setting, only one value should be assumed to be permitted.

      Returns:
      the how-many value, or null if not set
    • setHowMany

      public void setHowMany(@Nullable String value)
      Set the "Parameter Cardinality".

      Describes the number of selections that must occur. Without this setting, only one value should be assumed to be permitted.

      Parameters:
      value - the how-many value to set, or null to clear
    • getChoice

      @NonNull public List<dev.metaschema.core.datatype.markup.MarkupLine> getChoice()
      Get the "Choice".

      A value selection among several such options.

      Returns:
      the choice value
    • setChoice

      public void setChoice(@NonNull List<dev.metaschema.core.datatype.markup.MarkupLine> value)
      Set the "Choice".

      A value selection among several such options.

      Parameters:
      value - the choice value to set
    • addChoice

      public boolean addChoice(dev.metaschema.core.datatype.markup.MarkupLine item)
      Add a new MarkupLine item to the underlying collection.
      Parameters:
      item - the item to add
      Returns:
      true
    • removeChoice

      public boolean removeChoice(dev.metaschema.core.datatype.markup.MarkupLine item)
      Remove the first matching MarkupLine item from the underlying collection.
      Parameters:
      item - the item to remove
      Returns:
      true if the item was removed or false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object