Package adams.event
Class StorageChangeEvent
- java.lang.Object
-
- java.util.EventObject
-
- adams.event.StorageChangeEvent
-
- All Implemented Interfaces:
Serializable
public class StorageChangeEvent extends EventObject
Gets sent whenever storage items get modified.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStorageChangeEvent.TypeThe type of event.
-
Field Summary
Fields Modifier and Type Field Description protected Stringm_Cachethe cache (null if none).protected Stringm_Namethe name of the storage item.protected StorageChangeEvent.Typem_Typethe type of the event.-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description StorageChangeEvent(Storage source, StorageChangeEvent.Type type, String name)Initializes the event.StorageChangeEvent(Storage source, StorageChangeEvent.Type type, String name, String cache)Initializes the event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetCache()Returns the name of the affected cache.StringgetName()Returns the name of the storage item of this event.StorageChangeEvent.TypegetType()Returns the type of the event.StoragegetVariables()Returns the storage that triggered the event.StringtoString()Returns a string representation of the event.-
Methods inherited from class java.util.EventObject
getSource
-
-
-
-
Field Detail
-
m_Type
protected StorageChangeEvent.Type m_Type
the type of the event.
-
m_Name
protected String m_Name
the name of the storage item.
-
m_Cache
protected String m_Cache
the cache (null if none).
-
-
Constructor Detail
-
StorageChangeEvent
public StorageChangeEvent(Storage source, StorageChangeEvent.Type type, String name)
Initializes the event.- Parameters:
source- the storage object that triggered the eventtype- the type of eventname- the name of the variable
-
StorageChangeEvent
public StorageChangeEvent(Storage source, StorageChangeEvent.Type type, String name, String cache)
Initializes the event.- Parameters:
source- the storage object that triggered the eventtype- the type of eventname- the name of the variablecache- the affected cache, null if none
-
-
Method Detail
-
getVariables
public Storage getVariables()
Returns the storage that triggered the event.- Returns:
- the source
-
getType
public StorageChangeEvent.Type getType()
Returns the type of the event.- Returns:
- the type
-
getName
public String getName()
Returns the name of the storage item of this event.- Returns:
- the name
-
getCache
public String getCache()
Returns the name of the affected cache.- Returns:
- the name, null if no cache
-
toString
public String toString()
Returns a string representation of the event.- Overrides:
toStringin classEventObject- Returns:
- the string representation
-
-