Interface XMLCardinality

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  XMLCardinality.Single
      Cardinalities for single particles.
      static class  XMLCardinality.Unbounded
      Common cardinalities for unbounded particles.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static XMLCardinality DISABLED
      Cardinality of a disabled particle.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      OptionalInt getMaxOccurs()
      Returns the maximum number of occurrences of this particle.
      int getMinOccurs()
      Returns the minimum number of occurrences of this particle.
      default boolean isEnabled()
      Indicates whether or not the associated particle may occur at all, i.e. maxOccurs > 0
      default boolean isRepeatable()
      Indicates whether or not the associated particle can occur more than once, i.e. maxOccurs > 1
      default boolean isRequired()
      Indicates whether or not the associated particle must occur, i.e. minOccurs > 0
      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.
      static String toString​(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:
        isRequired in interface XMLUsage
        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
        Specified by:
        isEnabled in interface XMLUsage
        Returns:
        true, if the associated particle is enabled, false otherwise
      • 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 particle
        maxOccurs - when present, the maximum permissible occurrences of the associated particle, otherwise unbounded
        Returns:
        an XML cardinality