Package dev.metaschema.oscal.lib.model
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
ConstructorsConstructorDescriptionConstructs a newdev.metaschema.oscal.lib.model.ParameterSelectioninstance with no metadata.ParameterSelection(dev.metaschema.core.model.IMetaschemaData data) Constructs a newdev.metaschema.oscal.lib.model.ParameterSelectioninstance with the specified metadata. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddChoice(dev.metaschema.core.datatype.markup.MarkupLine item) Add a newMarkupLineitem to the underlying collection.List<dev.metaschema.core.datatype.markup.MarkupLine>Get the "Choice".Get the "Parameter Cardinality".dev.metaschema.core.model.IMetaschemaDatabooleanremoveChoice(dev.metaschema.core.datatype.markup.MarkupLine item) Remove the first matchingMarkupLineitem from the underlying collection.voidSet the "Choice".voidsetHowMany(String value) Set the "Parameter Cardinality".toString()
-
Constructor Details
-
ParameterSelection
public ParameterSelection()Constructs a newdev.metaschema.oscal.lib.model.ParameterSelectioninstance with no metadata. -
ParameterSelection
Constructs a newdev.metaschema.oscal.lib.model.ParameterSelectioninstance with the specified metadata.- Parameters:
data- the metaschema data, ornullif none
-
-
Method Details
-
getMetaschemaData
- Specified by:
getMetaschemaDatain interfacedev.metaschema.core.model.IBoundObject
-
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
nullif not set
-
setHowMany
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, ornullto clear
-
getChoice
Get the "Choice".A value selection among several such options.
- Returns:
- the choice value
-
setChoice
Set the "Choice".A value selection among several such options.
- Parameters:
value- the choice value to set
-
addChoice
Add a newMarkupLineitem to the underlying collection.- Parameters:
item- the item to add- Returns:
true
-
removeChoice
Remove the first matchingMarkupLineitem from the underlying collection.- Parameters:
item- the item to remove- Returns:
trueif the item was removed orfalseotherwise
-
toString
-