Package net.simplace.core
Klasse FWObservable
java.lang.Object
net.simplace.core.FWObservable
- Autor:
- Andreas Enders
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungFWObservable(Map<String, Object> aFormInputParameterMap, FWAbstractFunctionality aFormFunctionality) -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoidaddObserver(FWObserver aObserver) Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set.protected voidIndicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false.clone()Returns the number of observers of this Observable object.intReturns the number of observers of this Observable object.booleangetBooleanParameterValue(String aParamKey, boolean aDefault) Returns the number of observers of this Observable object.getParameter(String aKey) getParameter(String aKey, Object aDefault) booleanTests if this object has changed.booleanisParameterSet(String aKey) voidIf this object has changed, as indicated by thehasChangedmethod, then notify all of its observers and then call theclearChangedmethod to indicate that this object has no longer changed.voidnotifyObservers(Object arg) If this object has changed, as indicated by thehasChangedmethod, then notify all of its observers and then call theclearChangedmethod to indicate that this object has no longer changed.voidputAllParameters(Map<String, Object> aParamMap) voidremoveParameter(String aElement) replaceParamTokens(String aString, Object aDefault) replaces ParametersreplaceParamTokens(String aString, Object aDefault, boolean aIgnoreNull) replaces Parametersprotected voidMarks this Observable object as having been changed; the hasChanged method will now return true.voidsetParameterValue(String aKey, Object aValue) voidsetParameterValue(String aKey, Object aValue, boolean aShouldNotify) toString()
-
Konstruktordetails
-
FWObservable
public FWObservable(Map<String, Object> aFormInputParameterMap, FWAbstractFunctionality aFormFunctionality) - Parameter:
aFormInputParameterMap-aFormFunctionality-
-
FWObservable
public FWObservable()- Parameter:
aParameterMap-
-
-
Methodendetails
-
addObserver
Adds an observer to the set of observers for this object, provided that it is not the same as some observer already in the set. The order in which notifications will be delivered to multiple observers is not specified. See the class comment.- Parameter:
aObserver-o- an observer to be added.- Löst aus:
NullPointerException- if the parameter o is null.
-
getParameterMap
- Gibt zurück:
- the parameterMap
-
getStringParameterValue
- Parameter:
aKey-- Gibt zurück:
- one parameter value for given key - null if key was not set
-
getIntegerParameterValue
- Parameter:
aKey-- Gibt zurück:
- one parameter converted to Integer value for given key - null if key was not set or value not convertible
-
getDoubleParameterValue
- Parameter:
aKey-- Gibt zurück:
- one parameter converted to Double value for given key - null if key was not set or value not convertible
-
getBooleanParameterValue
- Parameter:
aParamKey-aDefault-- Gibt zurück:
- boolean parameter value
-
replaceParamTokens
replaces Parameters- Parameter:
aString-aDefault-- Gibt zurück:
- aNewValue
-
replaceParamTokens
replaces Parameters- Parameter:
aString-aDefault-aIgnoreNull-- Gibt zurück:
- aNewValue
-
getParameter
- Parameter:
aKey-- Gibt zurück:
- parameter by aKey
-
getParameter
- Parameter:
aKey-aDefault-- Gibt zurück:
- parameter by aKey or default value
-
setParameterValue
- Parameter:
aKey-aValue-
-
setParameterValue
- Parameter:
aKey-aValue-aShouldNotify-
-
getSystemID
- Gibt zurück:
- Identifier of this Functionality
-
notifyObservers
public void notifyObservers()If this object has changed, as indicated by thehasChangedmethod, then notify all of its observers and then call theclearChangedmethod to indicate that this object has no longer changed.Each observer has its
updatemethod called with two arguments: this observable object andnull. In other words, this method is equivalent to:notifyObservers(null)
- Siehe auch:
-
notifyObservers
If this object has changed, as indicated by thehasChangedmethod, then notify all of its observers and then call theclearChangedmethod to indicate that this object has no longer changed.Each observer has its
updatemethod called with two arguments: this observable object and theargargument.- Parameter:
arg- any object.- Siehe auch:
-
setChanged
protected void setChanged()Marks this Observable object as having been changed; the hasChanged method will now return true. -
clearChanged
protected void clearChanged()Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change, so that the hasChanged method will now return false. This method is called automatically by thenotifyObserversmethods.- Siehe auch:
-
hasChanged
public boolean hasChanged()Tests if this object has changed.- Gibt zurück:
trueif and only if thesetChangedmethod has been called more recently than theclearChangedmethod on this object;falseotherwise.- Siehe auch:
-
countObservers
public int countObservers()Returns the number of observers of this Observable object.- Gibt zurück:
- the number of observers of this object.
-
getFunctionality
Returns the number of observers of this Observable object.- Gibt zurück:
- the number of observers of this object.
-
clone
Returns the number of observers of this Observable object. -
removeParameter
- Parameter:
aElement-
-
putAllParameters
- Parameter:
aParamMap-
-
isParameterSet
- Parameter:
aKey-- Gibt zurück:
- true, is the parameter is set, otherwise returns false
-
toString
-