Package org.jboss.as.controller.xml
Interface XMLCardinality
- All Superinterfaces:
XMLUsage
- All Known Implementing Classes:
XMLCardinality.Single,XMLCardinality.Unbounded
Defines the cardinality of an XML particle.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumCardinalities for single particles.static enumCommon cardinalities for unbounded particles. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionReturns the maximum number of occurrences of this particle.intReturns the minimum number of occurrences of this particle.default booleanIndicates whether or not the associated particle may occur at all, i.e. maxOccurs > 0default booleanIndicates whether or not the associated particle can occur more than once, i.e. maxOccurs > 1default booleanIndicates whether or not the associated particle must occur, i.e. minOccurs > 0static XMLCardinalityof(int minOccurs, OptionalInt maxOccurs) Creates an XML cardinality with the specified minOccurs and maxOccurs that describes the number of permissible occurrences of a given XML particle.static StringtoString(XMLCardinality cardinality)
-
Field Details
-
DISABLED
Cardinality of a disabled particle.
-
-
Method Details
-
getMinOccurs
int getMinOccurs()Returns the minimum number of occurrences of this particle.- Returns:
- the minimum number of occurrences of this particle.
-
getMaxOccurs
OptionalInt getMaxOccurs()Returns the maximum number of occurrences of this particle.- Returns:
- the maximum number of occurrences of this particle.
-
isRequired
default boolean isRequired()Indicates whether or not the associated particle must occur, i.e. minOccurs > 0- Specified by:
isRequiredin interfaceXMLUsage- Returns:
- true, if the associated particle is required, false otherwise
-
isRepeatable
default boolean isRepeatable()Indicates whether or not the associated particle can occur more than once, i.e. maxOccurs > 1- Returns:
- true, if the associated particle is repeatable, false otherwise
-
isEnabled
default boolean isEnabled()Indicates whether or not the associated particle may occur at all, i.e. maxOccurs > 0 -
of
Creates an XML cardinality with the specified minOccurs and maxOccurs that describes the number of permissible occurrences of a given XML particle.- Parameters:
minOccurs- the minimum permissible occurrences of the associated particlemaxOccurs- when present, the maximum permissible occurrences of the associated particle, otherwise unbounded- Returns:
- an XML cardinality
-
toString
-