Package org.jboss.as.controller.xml
Interface XMLCardinality
-
- All Superinterfaces:
XMLUsage
- All Known Implementing Classes:
XMLCardinality.Single,XMLCardinality.Unbounded
public interface XMLCardinality extends XMLUsage
Defines the cardinality of an XML particle.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classXMLCardinality.SingleCardinalities for single particles.static classXMLCardinality.UnboundedCommon cardinalities for unbounded particles.
-
Field Summary
Fields Modifier and Type Field Description static XMLCardinalityDISABLEDCardinality of a disabled particle.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description OptionalIntgetMaxOccurs()Returns the maximum number of occurrences of this particle.intgetMinOccurs()Returns the minimum number of occurrences of this particle.default booleanisEnabled()Indicates whether or not the associated particle may occur at all, i.e. maxOccurs > 0default booleanisRepeatable()Indicates whether or not the associated particle can occur more than once, i.e. maxOccurs > 1default booleanisRequired()Indicates 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 Detail
-
DISABLED
static final XMLCardinality DISABLED
Cardinality of a disabled particle.
-
-
Method Detail
-
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
static XMLCardinality of(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.- 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
static String toString(XMLCardinality cardinality)
-
-