|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface LaraEnvironment
This class defines the interface between agents and its various environments:
Method Summary | ||
---|---|---|
void |
addEnvListener(LaraEnvironmentListener listener)
Adds an LaraEnvironmentListener to the entire
LaraEnvironment . |
|
void |
addEnvListener(LaraEnvironmentListener listener,
String name)
Registers a LaraEnvironmentListener at this environment to
observe only a certain property. |
|
void |
addProperty(LAbstractEnvironmentalProperty<?> property)
Adds a property in case it does not yet exist or updates it otherwise. |
|
boolean |
containsProperty(LAbstractEnvironmentalProperty<?> property)
Checks whether a property is in the list or not. |
|
boolean |
containsProperty(String name)
Checks whether a property name is in the environment or not. |
|
Set<LaraEnvironmentListener> |
getAllListeners()
Returns a set of all listeners - those that are registered at all properties and those registered at certain properties. |
|
Collection<LAbstractEnvironmentalProperty<?>> |
getEnvProperties()
Returns a Collection of all
LAbstractEnvironmentalProperty s of this environment. |
|
LAbstractEnvironmentalProperty<?> |
getPropertyByName(String name)
|
|
|
getTypedPropertyByName(String name)
|
|
boolean |
removeEnvListener(LaraEnvironmentListener listener)
Remove a LaraEnvironmentListener from the entire
LaraEnvironment . |
|
void |
removeEnvListener(LaraEnvironmentListener listener,
String name)
Removes a LaraEnvironmentListener at this environment from the
given property. |
|
boolean |
removeProperty(LAbstractEnvironmentalProperty<?> property)
Removes a property if it is contained in the environment's list. |
|
boolean |
removeProperty(String name)
Removes a property if it is contained in the environment's list. |
|
void |
updateProperty(LAbstractEnvironmentalProperty<?> property)
Changes an existing property or adds it in case it does not yet exist. |
Method Detail |
---|
void addEnvListener(LaraEnvironmentListener listener)
LaraEnvironmentListener
to the entire
LaraEnvironment
.
listener
- listener to add.void addEnvListener(LaraEnvironmentListener listener, String name)
LaraEnvironmentListener
at this environment to
observe only a certain property.
listener
- the observer to registername
- name of property to observevoid addProperty(LAbstractEnvironmentalProperty<?> property)
property
- property to addboolean containsProperty(LAbstractEnvironmentalProperty<?> property)
property
- property to check
boolean containsProperty(String name)
name
- name of property to check
Set<LaraEnvironmentListener> getAllListeners()
Collection<LAbstractEnvironmentalProperty<?>> getEnvProperties()
Collection
of all
LAbstractEnvironmentalProperty
s of this environment.
LAbstractEnvironmentalProperty
s stored
by this LaraEnvironment
LAbstractEnvironmentalProperty<?> getPropertyByName(String name)
name
- the LAbstractEnvironmentalProperty
's name
<V> LAbstractEnvironmentalProperty<V> getTypedPropertyByName(String name)
V
- type of requested propertyname
- the LAbstractEnvironmentalProperty
's name
boolean removeEnvListener(LaraEnvironmentListener listener)
LaraEnvironmentListener
from the entire
LaraEnvironment
. This does not impact listeners that are
registered at certain properties!
listener
- listener to remove.
void removeEnvListener(LaraEnvironmentListener listener, String name)
LaraEnvironmentListener
at this environment from the
given property. This does not impact possibly same listeners that are
registered at the whole Environment.
listener
- the observer to registername
- name of observed propertyboolean removeProperty(LAbstractEnvironmentalProperty<?> property)
property
- property to remove
boolean removeProperty(String name)
name
- name of property to remove
void updateProperty(LAbstractEnvironmentalProperty<?> property)
property
- property to update or add
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |