Package jadex.commons
Class SimplePropertyObject
- java.lang.Object
-
- jadex.commons.SimplePropertyObject
-
- All Implemented Interfaces:
IPropertyObject
- Direct Known Subclasses:
AbstractChartDataConsumer
,AbstractInteractionPlugin
,AbstractTask
,BurnWasteAction
,BurnWasteAction
,CreateCollectionTruckProcess
,CSVFileDataConsumer
,DefaultBDIVisionProcessor
,DefaultBDIVisionProcessor
,DefaultObjectCreationProcess
,DefaultVisionGenerator
,DefaultVisionGenerator
,DeltaTimeExecutor
,DiffusionProcess
,DropWasteAction
,DropWasteAction
,DropWasteAction
,EatAction
,EatAction
,EmptyWastebinAction
,EvaluationPlugin
,GameOfLifeProcess
,GetPosition
,GetPosition
,GoAction
,GoAction
,MicroPreyVisionProcessor
,MoveAction
,MoveAction
,MoveAction
,MoveAction
,PickupWasteAction
,PickupWasteAction
,PickupWasteAction
,RoundBasedExecutor
,ServiceVisionProcessor
,SetPosition
,SetPosition
,Space2D.KdTreeProcess
,TypedPropertyObject
public class SimplePropertyObject extends java.lang.Object implements IPropertyObject
Basic IPropertyObject implementation.
-
-
Field Summary
Fields Modifier and Type Field Description protected SimplePropertyChangeSupport
pcs
The property change support.protected java.util.Map
properties
The properties
-
Constructor Summary
Constructors Constructor Description SimplePropertyObject()
Create a new property object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list.java.util.Map
getProperties()
Get the properties (bean accessor).java.lang.Object
getProperty(java.lang.String name)
Returns a property.java.util.Set
getPropertyNames()
Returns all of the properties.boolean
hasProperty(java.lang.String name)
Tests if the given property name exists If an property isnull
it existsvoid
removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list.void
setProperties(java.util.Map properties)
Set the properties (bean accessor).void
setProperty(java.lang.String name, java.lang.Object value)
Sets a propertyjava.lang.String
toString()
Get the string representation.
-
-
-
Field Detail
-
properties
protected java.util.Map properties
The properties
-
pcs
protected SimplePropertyChangeSupport pcs
The property change support.
-
-
Method Detail
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
Returns a property.- Specified by:
getProperty
in interfaceIPropertyObject
- Parameters:
name
- name of the property- Returns:
- the property
-
getPropertyNames
public java.util.Set getPropertyNames()
Returns all of the properties.- Specified by:
getPropertyNames
in interfaceIPropertyObject
- Returns:
- the properties
-
setProperty
public void setProperty(java.lang.String name, java.lang.Object value)
Sets a property- Specified by:
setProperty
in interfaceIPropertyObject
- Parameters:
name
- name of the propertyvalue
- value of the property
-
hasProperty
public boolean hasProperty(java.lang.String name)
Description copied from interface:IPropertyObject
Tests if the given property name exists If an property isnull
it exists- Specified by:
hasProperty
in interfaceIPropertyObject
- Parameters:
name
- the name of the property to test- Returns:
true
if and only if the property exists
-
getProperties
public java.util.Map getProperties()
Get the properties (bean accessor).
-
setProperties
public void setProperties(java.util.Map properties)
Set the properties (bean accessor).
-
addPropertyChangeListener
public void addPropertyChangeListener(PropertyChangeListener listener)
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.- Parameters:
listener
- The PropertyChangeListener to be added.
-
removePropertyChangeListener
public void removePropertyChangeListener(PropertyChangeListener listener)
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties.- Parameters:
listener
- The PropertyChangeListener to be removed.
-
toString
public java.lang.String toString()
Get the string representation.- Overrides:
toString
in classjava.lang.Object
-
-