Welcome to the new Tigris! There have been some changes to the administration of mail lists. Project and list owners should check out the Discussion Services release notes.
jmt.measurement
Class AbstractMeasurementMethod
java.lang.Object
|
+--jmt.measurement.AbstractMeasurementMethod
- All Implemented Interfaces:
- MeasurementMethod
- Direct Known Subclasses:
- AbstractApplicationMeasurementMethod
- public abstract class AbstractMeasurementMethod
- extends java.lang.Object
- implements MeasurementMethod
Convenience abstract implementation of the MeasurementMethod to
be subclassed.
It also implements caching of results of measurement methods. The cache
can be enabled or disabled by the current implementations of this abstract
class by overriding the isCacheable method. By
default the caching is deactivated.
Note: The caching uses a soft-reference to store the object the result
was measured of.
- Author:
- Martin Kersten
|
Method Summary |
MeasurementResult |
getResult(java.lang.Object toMeasure)
Returns the measurement-result of the object or null if the object
is not measureable. |
abstract boolean |
isMeasureable(java.lang.Object toMeasure)
Returns true if the object is measurable by this method. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getResult
public final MeasurementResult getResult(java.lang.Object toMeasure)
- Returns the measurement-result of the object or null if the object
is not measureable.
- Specified by:
getResult in interface MeasurementMethod
- Parameters:
toMeasure - The object to be measured
- Returns:
- The result of the measurement or null.
isMeasureable
public abstract boolean isMeasureable(java.lang.Object toMeasure)
- Returns
true if the object is measurable by this method.
- Specified by:
isMeasureable in interface MeasurementMethod
- Parameters:
toMeasure - The object to measured
- Returns:
true if the object is measurable by this method