Interface ObjectState<T>

Type Parameters:
T - The type of object the state of which is being stored.
All Superinterfaces:
Modifiable
All Known Implementing Classes:
DefaultObjectState

public interface ObjectState<T> extends Modifiable
Deprecated.
Provides state information of an existing object, such as:
  • Descriptive properties of the object.
  • Whether the object has been modified.
Author:
Garret Wilson
  • Method Details

    • getObject

      T getObject()
      Deprecated.
      Returns:
      The non-null object being described.
    • getProperty

      Object getProperty(Object key)
      Deprecated.
      Gets a property of the object state.
      Parameters:
      key - The key to the property.
      Returns:
      The value of the object state's property, or null if that property does not exist.
    • setProperty

      Object setProperty(Object key, Object value)
      Deprecated.
      Sets the value of an object state property. If the property represented by the key already exists, it will be replaced.
      Parameters:
      key - The non-null property key.
      value - The property value.
      Returns:
      The old property value associated with the key, or null if no value was associated with the key previously.
    • removeProperty

      Object removeProperty(Object key)
      Deprecated.
      Removes a property of the object state. If the property represented by the key does not exist, no action is taken.
      Parameters:
      key - The non-null property key.
      Returns:
      The removed property value, or null if there was no property.
    • addPropertyChangeListener

      void addPropertyChangeListener(PropertyChangeListener listener)
      Deprecated.
      Adds a property change listener to the listener list. The listener is registered for all properties.

      If the listener is null, no exception is thrown and no action is performed.

      Parameters:
      listener - The PropertyChangeListener to be added.
      See Also:
    • removePropertyChangeListener

      void removePropertyChangeListener(PropertyChangeListener listener)
      Deprecated.
      Remove a property change listener from the listener list. This removes a PropertyChangeListener that was registered for all properties.

      If the listener is null, no exception is thrown and no action is performed.

      Parameters:
      listener - The PropertyChangeListener to be removed.
    • addPropertyChangeListener

      void addPropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Deprecated.
      Add a property change listener for a specific property. The listener will be invoked only when a call to firePropertyChange() names that specific property.

      If the listener is null, no exception is thrown and no action is performed.

      Parameters:
      propertyName - The name of the property to listen on.
      listener - The PropertyChangeListener to be added.
    • removePropertyChangeListener

      void removePropertyChangeListener(String propertyName, PropertyChangeListener listener)
      Deprecated.
      Remove a property change listener for a specific property.

      If the listener is null, no exception is thrown and no action is performed.

      Parameters:
      propertyName - The name of the property that was listened on.
      listener - The PropertyChangeListener to be removed