Package org.uma.jmetal.util.measure.impl
Class SimplePushMeasure<Value>
java.lang.Object
org.uma.jmetal.util.naming.impl.SimpleDescribedEntity
org.uma.jmetal.util.measure.impl.SimpleMeasure<Value>
org.uma.jmetal.util.measure.impl.SimplePushMeasure<Value>
- Type Parameters:
Value-
- All Implemented Interfaces:
Serializable,Measure<Value>,PushMeasure<Value>,DescribedEntity
- Direct Known Subclasses:
BasicMeasure,CountingMeasure,LastEvaluationMeasure
SimplePushMeasure is a basic implementation of PushMeasure.
As a PushMeasure, it is intended to be fed by the algorithm while
external entities should use register(MeasureListener) to be
notified in real time. For the algorithm to feed it, it should provide a
solution and its value to
invalid reference
#push(Object, Object)
- Author:
- Matthieu Vergne
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreate aSimplePushMeasurewith the class name as its name and anulldescription.SimplePushMeasure(String name) Create aSimplePushMeasurewith a given name and anulldescription.SimplePushMeasure(String name, String description) Create aSimplePushMeasurewith a given name and a given description. -
Method Summary
Modifier and TypeMethodDescriptionvoidNotify the observers which has registered aMeasureListenerthroughregister(MeasureListener)about a value.voidregister(MeasureListener<Value> listener) voidunregister(MeasureListener<Value> listener) Unregister aMeasureListenerregistered withPushMeasure.register(MeasureListener)to stop receiving the notifications of thePushMeasure.Methods inherited from class org.uma.jmetal.util.naming.impl.SimpleDescribedEntity
description, name, setDescription, setName, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.uma.jmetal.util.naming.DescribedEntity
description, name
-
Constructor Details
-
SimplePushMeasure
Create aSimplePushMeasurewith a given name and a given description. -
SimplePushMeasure
Create aSimplePushMeasurewith a given name and anulldescription.- Parameters:
name- the name of theMeasure
-
SimplePushMeasure
public SimplePushMeasure()Create aSimplePushMeasurewith the class name as its name and anulldescription.
-
-
Method Details
-
register
Description copied from interface:PushMeasure- Specified by:
registerin interfacePushMeasure<Value>- Parameters:
listener- theMeasureListenerto register
-
unregister
Description copied from interface:PushMeasureUnregister aMeasureListenerregistered withPushMeasure.register(MeasureListener)to stop receiving the notifications of thePushMeasure.- Specified by:
unregisterin interfacePushMeasure<Value>- Parameters:
listener- theMeasureListenerto unregister
-
push
Notify the observers which has registered aMeasureListenerthroughregister(MeasureListener)about a value.- Parameters:
value- the value to send to the observers
-