Package gov.nasa.worldwind.util
Class RestorableSupport.StateObject
- java.lang.Object
-
- gov.nasa.worldwind.util.RestorableSupport.StateObject
-
- Enclosing class:
- RestorableSupport
public static class RestorableSupport.StateObject extends java.lang.Object
An interface to thestateObject
elements in an XML state document, as defined byRestorableSupport
. Thename
and simple Stringvalue
of astateObject
can be queried or set through StateObject. This also serves as a context through which nestedstateObjects
can be found or created.
-
-
Constructor Summary
Constructors Constructor Description StateObject(org.w3c.dom.Element element)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Returns the name of this StateObject as a String, or null if this StateObject has no name.java.lang.String
getValue()
Returns the value of this StateObject as a String, or null if this StateObject has no value.void
setName(java.lang.String name)
Sets the name of this StateObject to the specified String.void
setValue(java.lang.String value)
Sets the value of this StateObject to the specified String.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of this StateObject as a String, or null if this StateObject has no name.- Returns:
- this StateObject's name.
-
setName
public void setName(java.lang.String name)
Sets the name of this StateObject to the specified String.- Parameters:
name
- the new name of this StateObject.- Throws:
java.lang.IllegalArgumentException
- Ifname
is null.
-
getValue
public java.lang.String getValue()
Returns the value of this StateObject as a String, or null if this StateObject has no value. If there are StateObjects nested beneath this one, then the entire tree beneath this StateObject is converted to a String and returned.- Returns:
- the value of this StateObject as a String.
-
setValue
public void setValue(java.lang.String value)
Sets the value of this StateObject to the specified String. If there are StateObjects nested beneath this one, then the entire tree beneath this StateObject is replaced with the specified value.- Parameters:
value
- String value that replaces this StateObject's value.- Throws:
java.lang.IllegalArgumentException
- Ifvalue
is null.
-
-