Package org.openjdk.jmc.common.util
Class StatefulState.StatefulStateWriter
- java.lang.Object
-
- org.openjdk.jmc.common.util.StatefulState.StatefulStateWriter
-
- All Implemented Interfaces:
IWritableState
- Enclosing class:
- StatefulState
private static class StatefulState.StatefulStateWriter extends java.lang.Object implements IWritableState
StatefulState instances should be kept immutable, so the writer must not be exposed.
-
-
Field Summary
Fields Modifier and Type Field Description private StatefulState
destination
-
Constructor Summary
Constructors Constructor Description StatefulStateWriter(StatefulState destination)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IWritableState
createChild(java.lang.String type)
Creates a new child node.void
putString(java.lang.String key, java.lang.String value)
Stores a named attribute value.
-
-
-
Field Detail
-
destination
private final StatefulState destination
-
-
Constructor Detail
-
StatefulStateWriter
StatefulStateWriter(StatefulState destination)
-
-
Method Detail
-
putString
public void putString(java.lang.String key, java.lang.String value)
Description copied from interface:IWritableState
Stores a named attribute value. Multiple values with the same key is not supported. If called multiple times with the same key then only the latest value should be kept.- Specified by:
putString
in interfaceIWritableState
- Parameters:
key
- attribute keyvalue
- attribute value
-
createChild
public IWritableState createChild(java.lang.String type)
Description copied from interface:IWritableState
Creates a new child node. Multiple nodes of the same type are permitted.- Specified by:
createChild
in interfaceIWritableState
- Parameters:
type
- node type- Returns:
- a new child node
-
-