Class DefaultCardinalityConstraint
- java.lang.Object
-
- gov.nist.secauto.metaschema.core.model.constraint.AbstractConstraint
-
- gov.nist.secauto.metaschema.core.model.constraint.DefaultCardinalityConstraint
-
- All Implemented Interfaces:
ICardinalityConstraint
,IConstraint
public final class DefaultCardinalityConstraint extends AbstractConstraint implements ICardinalityConstraint
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultCardinalityConstraint.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.IConstraint
IConstraint.ExternalModelSource, IConstraint.ExternalSource, IConstraint.InternalModelSource, IConstraint.ISource, IConstraint.Level
-
-
Field Summary
-
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 DefaultCardinalityConstraint.Builder
builder()
Integer
getMaxOccurs()
Retrieve the required maximum occurrence of the target instance.Integer
getMinOccurs()
Retrieve the required minimum occurrence of the target instance.-
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.IConstraint
getDescription, getFormalName, getId, getLevel, getProperties, getRemarks, getSource, getTarget, matchTargets, matchTargets
-
-
-
-
Method Detail
-
getMinOccurs
public Integer getMinOccurs()
Description copied from interface:ICardinalityConstraint
Retrieve the required minimum occurrence of the target instance. If specified, this value must be less than or equal to the value ofIModelInstance.getMaxOccurs()
and greater thanIModelInstance.getMinOccurs()
.- Specified by:
getMinOccurs
in interfaceICardinalityConstraint
- Returns:
- a non-negative integer or
null
if not defined
-
getMaxOccurs
public Integer getMaxOccurs()
Description copied from interface:ICardinalityConstraint
Retrieve the required maximum occurrence of the target instance. If specified, this value must be less than the value ofIModelInstance.getMaxOccurs()
and greater than or equal toIModelInstance.getMinOccurs()
.- Specified by:
getMaxOccurs
in interfaceICardinalityConstraint
- Returns:
- a non-negative integer or
null
if not defined
-
accept
public <T,R> R accept(IConstraintVisitor<T,R> visitor, T state)
- Specified by:
accept
in interfaceIConstraint
-
builder
@NonNull public static DefaultCardinalityConstraint.Builder builder()
-
-