Enum CompositeNodeDataWithSchema.ChildReusePolicy
- java.lang.Object
-
- java.lang.Enum<CompositeNodeDataWithSchema.ChildReusePolicy>
-
- org.opendaylight.yangtools.yang.data.util.CompositeNodeDataWithSchema.ChildReusePolicy
-
- All Implemented Interfaces:
Serializable
,Comparable<CompositeNodeDataWithSchema.ChildReusePolicy>
- Enclosing class:
- CompositeNodeDataWithSchema<T extends DataSchemaNode>
@Beta public static enum CompositeNodeDataWithSchema.ChildReusePolicy extends Enum<CompositeNodeDataWithSchema.ChildReusePolicy>
Policy on how child nodes should be treated when an attempt is made to add them multiple times.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompositeNodeDataWithSchema.ChildReusePolicy
valueOf(String name)
Returns the enum constant of this type with the specified name.static CompositeNodeDataWithSchema.ChildReusePolicy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NOOP
public static final CompositeNodeDataWithSchema.ChildReusePolicy NOOP
Do not consider any existing nodes at all, just perform a straight append. Multiple occurrences of a child will result in multiple children being emitted. This is almost certainly the wrong policy unless the caller prevents such a situation from arising via some different mechanism.
-
REJECT
public static final CompositeNodeDataWithSchema.ChildReusePolicy REJECT
Do not allow duplicate definition of a child node. This would typically be used when a child cannot be encountered multiple times, but the caller does not make any provision to detect such a conflict. If a child node would end up being defined a second time,DuplicateChildNodeRejectedException
is reported.
-
REUSE
public static final CompositeNodeDataWithSchema.ChildReusePolicy REUSE
Reuse previously-defined child node. This is most appropriate when a child may be visited multiple times and the intent is to append content of each visit. A typical usage is list elements with RFC7950 XML encoding, where there is no encapsulating element and hence list entries may be interleaved with other children.
-
-
Method Detail
-
values
public static CompositeNodeDataWithSchema.ChildReusePolicy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (CompositeNodeDataWithSchema.ChildReusePolicy c : CompositeNodeDataWithSchema.ChildReusePolicy.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static CompositeNodeDataWithSchema.ChildReusePolicy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
-