edu.umd.cs.jazz.util
Class ZProperty

java.lang.Object
  |
  +--edu.umd.cs.jazz.util.ZProperty
All Implemented Interfaces:
java.io.Serializable, ZSerializable

public class ZProperty
extends java.lang.Object
implements ZSerializable, java.io.Serializable

ZProperty represents a ZNode client property. It just encapsulates a (key, value) pair, and supports ZSerialization.

Warning: Serialized and ZSerialized objects of this class will not be compatible with future Jazz releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Jazz. A future release of Jazz will provide support for long term persistence.

See Also:
Serialized Form

Constructor Summary
ZProperty()
          Create an empty ZProperty.
ZProperty(java.lang.Object key, java.lang.Object value)
          Create a ZProperty with the specified (key, value) pair
 
Method Summary
 java.lang.Object clone()
          Duplicates this property by using the copy constructor.
 java.lang.Object getKey()
          Determine the key of this property.
 java.lang.Object getValue()
          Determine the value of this property.
 void set(java.lang.Object key, java.lang.Object value)
          Set the (key, value) pair stored in this property
 void setKey(java.lang.Object key)
          Specify the key of this property.
 void setState(java.lang.String fieldType, java.lang.String fieldName, java.lang.Object fieldValue)
          Set some state of this object as it gets read back in.
 void setValue(java.lang.Object value)
          Specify the value of this property.
 java.lang.String toString()
          Generate a string that represents this object for debugging.
 void updateObjectReferences(ZObjectReferenceTable objRefTable)
          Update object references after a clone.
 void writeObject(ZObjectOutputStream out)
          Write out all of this object's state.
 void writeObjectRecurse(ZObjectOutputStream out)
          Specify which objects this object references in order to write out the scenegraph properly
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ZProperty

public ZProperty()
Create an empty ZProperty.

ZProperty

public ZProperty(java.lang.Object key,
                 java.lang.Object value)
Create a ZProperty with the specified (key, value) pair
Parameters:
key - the new property key
value - the new property value
Method Detail

clone

public java.lang.Object clone()
Duplicates this property by using the copy constructor. See the copy constructor comments for complete information about what is duplicated.
Overrides:
clone in class java.lang.Object

set

public void set(java.lang.Object key,
                java.lang.Object value)
Set the (key, value) pair stored in this property
Parameters:
key - the new property key
value - the new property value

getKey

public java.lang.Object getKey()
Determine the key of this property.
Returns:
the property key

getValue

public java.lang.Object getValue()
Determine the value of this property.
Returns:
the property value

setKey

public void setKey(java.lang.Object key)
Specify the key of this property.
Parameters:
key - the new property key

setValue

public void setValue(java.lang.Object value)
Specify the value of this property.
Parameters:
value - the new property value

updateObjectReferences

public void updateObjectReferences(ZObjectReferenceTable objRefTable)
Update object references after a clone.
See Also:
ZSceneGraphObject.updateObjectReferences(edu.umd.cs.jazz.util.ZObjectReferenceTable)

toString

public java.lang.String toString()
Generate a string that represents this object for debugging.
Overrides:
toString in class java.lang.Object
Returns:
the string that represents this object for debugging

writeObject

public void writeObject(ZObjectOutputStream out)
                 throws java.io.IOException
Write out all of this object's state.
Specified by:
writeObject in interface ZSerializable
Parameters:
out - The stream that this object writes into

writeObjectRecurse

public void writeObjectRecurse(ZObjectOutputStream out)
                        throws java.io.IOException
Specify which objects this object references in order to write out the scenegraph properly
Specified by:
writeObjectRecurse in interface ZSerializable
Parameters:
out - The stream that this object writes into

setState

public void setState(java.lang.String fieldType,
                     java.lang.String fieldName,
                     java.lang.Object fieldValue)
Set some state of this object as it gets read back in. After the object is created with its default no-arg constructor, this method will be called on the object once for each bit of state that was written out through calls to ZObjectOutputStream.writeState() within the writeObject method.
Specified by:
setState in interface ZSerializable
Parameters:
fieldType - The fully qualified type of the field
fieldName - The name of the field
fieldValue - The value of the field


Copyright © 2001 by University of Maryland, College Park, MD 20742, USA All rights reserved.