T
- the type that is builtB
- the builder typepublic static interface MGroup.Builder<T,B> extends MNode.Builder<T,B>
Only subtypes of this builder can be instantiated.
Modifier and Type | Method and Description |
---|---|
B |
add(MNode node)
Add a child node (record or field) with a fixed multiplicity of 1.
|
B |
add(MNode node,
int occurrences)
Add a child node (record or field) with fixed multiplicity.
|
B |
add(MNode node,
int minimum,
int maximum)
Add a child node (record or field) with variable multiplicity.
|
build, name
B add(MNode node) throws IllegalArgumentException, MetadataViolationException
node
- the node metadata to add to the groupIllegalArgumentException
- if node
is nullMetadataViolationException
- if adding of the node would
violate a metadata rule such as no duplicates or a nesting
rule violationB add(MNode node, int occurrences) throws IllegalArgumentException, MetadataViolationException
node
- the node metadata to add to the groupoccurrences
- the fixed number of occurrences of the node within
the group. This must be 1 or greaterIllegalArgumentException
- if node
is null or
occurrences
is invalidMetadataViolationException
- if adding of the node would
violate a metadata rule such as no duplicates, nesting rule
violation or multiplicity rule violationB add(MNode node, int minimum, int maximum) throws IllegalArgumentException, MetadataViolationException
node
- the node metadata to add to the groupminimum
- the minimum number of occurrences of the node within
the group. This may be 0 or greater and must be less than or
equal to the maximum
value (unless maximum
is
-1)maximum
- the maximum number of occurrences of the node within
the group. This must be 1 or greater and greater than or equal
to the minimum
value. The special value of -1 may be
used to indicate an unlimited number of occurrences but there
may be restrictions upon the use of the value (for example,
may only be allowed for the final node within the groupIllegalArgumentException
- if node
is null or
minimum
or maximum
value is invalidMetadataViolationException
- if adding of the node would
violate a metadata rule such as no duplicates, nesting rule
violation or multiplicity rule violationCopyright © 2016 Push Technology Ltd. All Rights Reserved.