Package org.openjdk.jmc.common.util
Class StatefulState
- java.lang.Object
-
- org.openjdk.jmc.common.util.StatefulState
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StatefulStatecreate(IStateful state)Create a new instance.StringgetAttribute(String key)Gets a named attribute value.String[]getAttributeKeys()Return an array with the attribute keys for this state.StatefulStategetChild(String type)Gets a child of the named type.StatefulState[]getChildren()Gets all child nodes.StatefulState[]getChildren(String type)Gets all child nodes of a named type.StringgetType()Get the node type of this state.voidsaveTo(IWritableState state)Saves the state for this object into a state object.StringtoString()
-
-
-
Method Detail
-
getType
public String getType()
Description copied from interface:IStateGet the node type of this state.
-
getChild
public StatefulState getChild(String type)
Description copied from interface:IStateGets a child of the named type. If there are several child nodes of the same type then any of them may be returned.
-
getAttributeKeys
public String[] getAttributeKeys()
Description copied from interface:IStateReturn an array with the attribute keys for this state.- Specified by:
getAttributeKeysin interfaceIState- Returns:
- attribute keys
-
getAttribute
public String getAttribute(String key)
Description copied from interface:IStateGets a named attribute value.- Specified by:
getAttributein interfaceIState- Parameters:
key- attribute key- Returns:
- attribute value
-
getChildren
public StatefulState[] getChildren()
Description copied from interface:IStateGets all child nodes.- Specified by:
getChildrenin interfaceIState- Returns:
- an array of child nodes
-
getChildren
public StatefulState[] getChildren(String type)
Description copied from interface:IStateGets all child nodes of a named type.- Specified by:
getChildrenin interfaceIState- Parameters:
type- node type- Returns:
- an array of child nodes
-
saveTo
public void saveTo(IWritableState state)
Description copied from interface:IStatefulSaves the state for this object into a state object.
-
create
public static StatefulState create(IStateful state)
Create a new instance.- Parameters:
state- object whose state will be loaded into the new instance- Returns:
- a new state instance
-
-