Enum Class 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>
,Constable
- 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.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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
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
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 Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-