Package com.globalmentor.model
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
Deprecated.
Provides state information of an existing object, such as:
- Descriptive properties of the object.
- Whether the object has been modified.
- Author:
- Garret Wilson
-
Field Summary
Fields inherited from interface com.globalmentor.model.Modifiable
MODIFIED_PROPERTY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Deprecated.Adds a property change listener to the listener list.void
addPropertyChangeListener
(String propertyName, PropertyChangeListener listener) Deprecated.Add a property change listener for a specific property.Deprecated.getProperty
(Object key) Deprecated.Gets a property of the object state.removeProperty
(Object key) Deprecated.Removes a property of the object state.void
Deprecated.Remove a property change listener from the listener list.void
removePropertyChangeListener
(String propertyName, PropertyChangeListener listener) Deprecated.Remove a property change listener for a specific property.setProperty
(Object key, Object value) Deprecated.Sets the value of an object state property.Methods inherited from interface com.globalmentor.model.Modifiable
isModified, setModified
-
Method Details
-
getObject
T getObject()Deprecated.- Returns:
- The non-
null
object being described.
-
getProperty
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
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
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
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
- ThePropertyChangeListener
to be added.- See Also:
-
removePropertyChangeListener
Deprecated.Remove a property change listener from the listener list. This removes aPropertyChangeListener
that was registered for all properties.If the listener is
null
, no exception is thrown and no action is performed.- Parameters:
listener
- ThePropertyChangeListener
to be removed.
-
addPropertyChangeListener
Deprecated.Add a property change listener for a specific property. The listener will be invoked only when a call tofirePropertyChange()
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
- ThePropertyChangeListener
to be added.
-
removePropertyChangeListener
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
- ThePropertyChangeListener
to be removed
-