de.cesr.more.measures.network
Class MAbstractNetworkMeasure

java.lang.Object
  extended by de.cesr.more.measures.network.MAbstractNetworkMeasure
All Implemented Interfaces:
MoreMeasure

public abstract class MAbstractNetworkMeasure
extends Object
implements MoreMeasure

MORe The basic measure class that holds the measure type, a map of parameters, the MMeasureDescription and the MoreAction responsible for measure calculation. The parameters map should be filled with valid String keys the user might provide values for. The user than scans the map and assigns values to the keys.

Date:
15.08.2008

Field Summary
protected  MoreAction action
          The action to schedule the measure calculation
protected  MMeasureDescription desc
          The measure description
protected  Map<String,Object> parameters
          Parameters used to calculate this measure
protected  Class<?> type
          the measure's type
 
Constructor Summary
MAbstractNetworkMeasure(MMeasureDescription description, Class<?> measureType)
           
MAbstractNetworkMeasure(MMeasureDescription description, Class<?> measureType, Map<String,Object> parameters)
          Initializes a Measure with its MMeasureDescription, its return type class and a map with defined keys and default values as parameters.
 
Method Summary
abstract
<T,EdgeType extends MoreEdge<? super T>>
MoreAction
getAction(MoreNetwork<T,EdgeType> network, Map<String,Object> parameters)
          A new measure need to provide a MoreAction that calculates the measure values
 MMeasureDescription getMeasureDescription()
           
 Map<String,Object> getParameters()
           
 Class<?> getType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

protected Class<?> type
the measure's type


desc

protected MMeasureDescription desc
The measure description


parameters

protected Map<String,Object> parameters
Parameters used to calculate this measure


action

protected MoreAction action
The action to schedule the measure calculation

Constructor Detail

MAbstractNetworkMeasure

public MAbstractNetworkMeasure(MMeasureDescription description,
                               Class<?> measureType)
Parameters:
description - The measure description
measureType - the measure's type
See Also:
MAbstractNetworkMeasure#MNetworkMeasure(MMeasureDescription, Class, Map)

MAbstractNetworkMeasure

public MAbstractNetworkMeasure(MMeasureDescription description,
                               Class<?> measureType,
                               Map<String,Object> parameters)
Initializes a Measure with its MMeasureDescription, its return type class and a map with defined keys and default values as parameters.

Parameters:
description - The MMeasureDescription
measureType - The class type of the object that represents the measure and is set at the nodes
parameters - A map with predefined key-(default)values pairs as parameters
Method Detail

getType

public Class<?> getType()
Specified by:
getType in interface MoreMeasure
Returns:
The class type of the object that represents the measure and is set at the nodes
Date:
15.08.2008

getParameters

public Map<String,Object> getParameters()
Specified by:
getParameters in interface MoreMeasure
Returns:
A map with key-values pairs as parameters for this measure
Date:
15.08.2008

getMeasureDescription

public MMeasureDescription getMeasureDescription()
Specified by:
getMeasureDescription in interface MoreMeasure
Returns:
The MMeasureDescription for this measure
Date:
15.08.2008

getAction

public abstract <T,EdgeType extends MoreEdge<? super T>> MoreAction getAction(MoreNetwork<T,EdgeType> network,
                                                                              Map<String,Object> parameters)
A new measure need to provide a MoreAction that calculates the measure values

Type Parameters:
T - The node type
EdgeType - the network's edge type
Parameters:
network - The network the measure is calculated for
parameters - The parameter map
Returns:
The BasicAction that is scheduled for computation
Date:
15.08.2008