de.cesr.more.measures
Class MAbstractMeasureSupplier

java.lang.Object
  extended by de.cesr.more.measures.MAbstractMeasureSupplier
All Implemented Interfaces:
MoreMeasureSupplier
Direct Known Subclasses:
MAbstractMeasureManager, MAvgNearestNeighbourDegree, MBasicNetworkMeasureSupplier, MBasicNodeMeasureSupplier, MCcNetworkMeasureRSupplier, MCcNetworkMeasureSupplier, MCentralityNetMSupplier, MCentralityNodeMSupplier, MClusteringCoefficientR, MCompNetInfoSupplier, MModularityMeasureSupplier, MNetworkMeasureManagerTest.MarkerNetworkMeasureSupplier, MNetworkStatisticsSupplier, MNodeMeasureManagerTest.MarkerNodeMeasureSupplier

public abstract class MAbstractMeasureSupplier
extends Object
implements MoreMeasureSupplier

Provides a basic implementation of MoreMeasureSupplier

Date:
10.07.2008

Field Summary
protected  Set<MoreMeasureCategory> categories
          Set that hold all MeasureCategory this supplier supports
protected  Map<MMeasureDescription,MoreMeasure> measures
          A map that contains MeasureDescription and their Measures
protected  Set<MoreMeasureSupplier> suppliers
          A Set that stores all children
 
Constructor Summary
MAbstractMeasureSupplier()
          Basic constructor that initializes the map and sets
 
Method Summary
 boolean addMeasureSupplier(MoreMeasureSupplier supplier)
          Registers another NetworkMeasureSupplier at the implementing supplier
 boolean equals(Object o)
          Uses the Classes of the objects to compare and calls the classes' equals.
 MoreMeasure findMeasure(MMeasureDescription description)
          Delegate Pattern / Chain of Responsibility: Searches for a MoreMeasure according to the given MMeasureDescription in the chain of MoreMeasureSuppliers.
 Set<MoreMeasureCategory> getCategories()
          Return all MeasureCategorys this supplier provides Measures for
 Set<MMeasureDescription> getMeasureDescriptions()
          Returns MeasureDescription of the Measures this supplier provides
 int hashCode()
           
 boolean removeMeasureSupplier(MoreMeasureSupplier supplier)
          Removes another NetworkMeasureSupplier at the implementing supplier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

measures

protected Map<MMeasureDescription,MoreMeasure> measures
A map that contains MeasureDescription and their Measures


categories

protected Set<MoreMeasureCategory> categories
Set that hold all MeasureCategory this supplier supports


suppliers

protected Set<MoreMeasureSupplier> suppliers
A Set that stores all children

Constructor Detail

MAbstractMeasureSupplier

public MAbstractMeasureSupplier()
Basic constructor that initializes the map and sets

Method Detail

addMeasureSupplier

public boolean addMeasureSupplier(MoreMeasureSupplier supplier)
Description copied from interface: MoreMeasureSupplier
Registers another NetworkMeasureSupplier at the implementing supplier

Specified by:
addMeasureSupplier in interface MoreMeasureSupplier
Parameters:
supplier - The NetworkMeasureSupplier to register
Returns:
true is adding was successful
See Also:
edu.MoreMeasureSupplier.sh.soneta.measures.supply.NetworkMeasureSupplier#addMeasureSupplier(edu.MoreMeasureSupplier.sh.soneta.measures.supply.NetworkMeasureSupplier)

removeMeasureSupplier

public boolean removeMeasureSupplier(MoreMeasureSupplier supplier)
Description copied from interface: MoreMeasureSupplier
Removes another NetworkMeasureSupplier at the implementing supplier

Specified by:
removeMeasureSupplier in interface MoreMeasureSupplier
Parameters:
supplier - The NetworkMeasureSupplier to register
Returns:
true if removing was successful
See Also:
edu.MoreMeasureSupplier.sh.soneta.measures.supply.NetworkMeasureSupplier#removeMeasureSupplier(edu.MoreMeasureSupplier.sh.soneta.measures.supply.NetworkMeasureSupplier)

getMeasureDescriptions

public Set<MMeasureDescription> getMeasureDescriptions()
Description copied from interface: MoreMeasureSupplier
Returns MeasureDescription of the Measures this supplier provides

Specified by:
getMeasureDescriptions in interface MoreMeasureSupplier
Returns:
A set of MeasureDescriptions
See Also:
edu.MoreMeasureSupplier.sh.soneta.measures.supply.NetworkMeasureSupplier#getMeasureDescriptions()

findMeasure

public MoreMeasure findMeasure(MMeasureDescription description)
Delegate Pattern / Chain of Responsibility: Searches for a MoreMeasure according to the given MMeasureDescription in the chain of MoreMeasureSuppliers.

Specified by:
findMeasure in interface MoreMeasureSupplier
Parameters:
description - the MeasureDescription whose calculation providing Measure is demanded
Returns:
the Measure that belongs to the given MeasureDescription
See Also:
edu.MoreMeasureSupplier.sh.soneta.measures.supply.NetworkMeasureSupplier#findMeasure(edu.uos.sh.soneta.measures.NetworkMeasureUtilities.MeasureDescriptionTemp)

getCategories

public Set<MoreMeasureCategory> getCategories()
Description copied from interface: MoreMeasureSupplier
Return all MeasureCategorys this supplier provides Measures for

Specified by:
getCategories in interface MoreMeasureSupplier
Returns:
MeasureCategorys this supplier provides Measures for
See Also:
edu.MoreMeasureSupplier.sh.soneta.measures.supply.NetworkMeasureSupplier#getCategories()

equals

public boolean equals(Object o)
Uses the Classes of the objects to compare and calls the classes' equals.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()