Class DefaultAllowedValuesConstraint
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
-
- gov.nist.secauto.metaschema.core.model.constraint.DefaultAllowedValuesConstraint
-
- All Implemented Interfaces:
IAllowedValuesConstraint
,IConstraint
public final class DefaultAllowedValuesConstraint extends AbstractConstraint implements IAllowedValuesConstraint
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultAllowedValuesConstraint.Builder
-
Nested classes/interfaces inherited from class gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
AbstractConstraint.AbstractConstraintBuilder<T extends AbstractConstraint.AbstractConstraintBuilder<T,R>,R extends AbstractConstraint>
-
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IAllowedValuesConstraint
IAllowedValuesConstraint.Extensible
-
Nested classes/interfaces inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
IConstraint.ExternalModelSource, IConstraint.ExternalSource, IConstraint.InternalModelSource, IConstraint.ISource, IConstraint.Level
-
-
Field Summary
-
Fields inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IAllowedValuesConstraint
DEFAULT_ALLOW_OTHER, DEFAULT_EXTENSIBLE
-
Fields inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
DEFAULT_LEVEL, DEFAULT_TARGET, DEFAULT_TARGET_METAPATH
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,R>
Raccept(IConstraintVisitor<T,R> visitor, T state)
static DefaultAllowedValuesConstraint.Builder
builder()
Map<String,DefaultAllowedValue>
getAllowedValues()
Get the collection allowed values associated with this constraint.IAllowedValuesConstraint.Extensible
getExtensible()
Determines the degree to which this constraint can be extended by other constraints applied to the same value.boolean
isAllowedOther()
Determines if this allowed value constraint is open-ended (true
) or closed.-
Methods inherited from class gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IAllowedValuesConstraint
getAllowedValue
-
Methods inherited from interface gov.nist.secauto.metaschema.core.model.constraint.IConstraint
getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget, matchTargets, matchTargets
-
-
-
-
Method Detail
-
getAllowedValues
public Map<String,DefaultAllowedValue> getAllowedValues()
Description copied from interface:IAllowedValuesConstraint
Get the collection allowed values associated with this constraint.- Specified by:
getAllowedValues
in interfaceIAllowedValuesConstraint
- Returns:
- a mapping of value to the associated
IAllowedValue
item
-
isAllowedOther
public boolean isAllowedOther()
Description copied from interface:IAllowedValuesConstraint
Determines if this allowed value constraint is open-ended (true
) or closed. If "open-ended", the constraint allows the target's value to by any additional unspecified value. If "closed", the constraint requries the target's value to be one of the specified values.- Specified by:
isAllowedOther
in interfaceIAllowedValuesConstraint
- Returns:
true
if the constraint is "open-ended", orfalse
otherwise
-
getExtensible
public IAllowedValuesConstraint.Extensible getExtensible()
Description copied from interface:IAllowedValuesConstraint
Determines the degree to which this constraint can be extended by other constraints applied to the same value.- Specified by:
getExtensible
in interfaceIAllowedValuesConstraint
- Returns:
- the enumeration value
-
accept
public <T,R> R accept(IConstraintVisitor<T,R> visitor, T state)
- Specified by:
accept
in interfaceIConstraint
-
builder
@NonNull public static DefaultAllowedValuesConstraint.Builder builder()
-
-