Class ModelTransaction.AddAttributeOperation
java.lang.Object
org.apache.commons.configuration2.tree.ModelTransaction.Operation
org.apache.commons.configuration2.tree.ModelTransaction.AddAttributeOperation
- Enclosing class:
- ModelTransaction
A specialized operation class for adding an attribute to a target node.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAddAttributeOperation
(String name, Object value) Creates a new instance ofAddAttributeOperation
. -
Method Summary
Modifier and TypeMethodDescriptionprotected ImmutableNode
apply
(ImmutableNode target, ModelTransaction.Operations operations) Executes this operation on the provided target node returning the result.
-
Field Details
-
attributeName
The attribute name. -
attributeValue
The attribute value.
-
-
Constructor Details
-
AddAttributeOperation
Creates a new instance ofAddAttributeOperation
.- Parameters:
name
- the name of the attributevalue
- the value of the attribute
-
-
Method Details
-
apply
Description copied from class:ModelTransaction.Operation
Executes this operation on the provided target node returning the result.- Specified by:
apply
in classModelTransaction.Operation
- Parameters:
target
- the target node for this operationoperations
- the currentOperations
instance- Returns:
- the manipulated node
-