NASA World Wind

gov.nasa.worldwind.util
Class RestorableSupport.StateObject

java.lang.Object
  extended by gov.nasa.worldwind.util.RestorableSupport.StateObject
Enclosing class:
RestorableSupport

public static class RestorableSupport.StateObject
extends Object

An interface to the stateObject elements in an XML state document, as defined by RestorableSupport. The name and simple String value of a stateObject can be queried or set through StateObject. This also serves as a context through which nested stateObjects can be found or created.


Method Summary
 String getName()
          Returns the name of this StateObject as a String, or null if this StateObject has no name.
 String getValue()
          Returns the value of this StateObject as a String, or null if this StateObject has no value.
 void setName(String name)
          Sets the name of this StateObject to the specified String.
 void setValue(String value)
          Sets the value of this StateObject to the specified String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getName

public String getName()
Returns the name of this StateObject as a String, or null if this StateObject has no name.

Returns:
this StateObject's name.

getValue

public 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.

setName

public void setName(String name)
Sets the name of this StateObject to the specified String.

Parameters:
name - the new name of this StateObject.
Throws:
IllegalArgumentException - If name is null.

setValue

public void setValue(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 will replace this StateObject's value.
Throws:
IllegalArgumentException - If value is null.

NASA World Wind