de.ipk_gatersleben.ag_nw.centilib.centralities.parameter
Class CentralityParameter

java.lang.Object
  extended by de.ipk_gatersleben.ag_nw.centilib.centralities.parameter.CentralityParameter

public abstract class CentralityParameter
extends Object

An abstract class for centrality parameter values. The function askForValue() is called by askUserForValue() and should be implemented to get the centrality specific value from the user. Otherwise the method setValue(Double) should be used. The value can be set only once; Use getMinValue() and getMaxValue() to get the range of possible numbers

Author:
Johannes Graessler

Field Summary
protected  Double param
           
 
Constructor Summary
CentralityParameter()
           
 
Method Summary
protected abstract  Double askForValue()
           
 boolean askUserForValue()
          This method should be called to get the parameter from the user.
abstract  Double getMaxValue()
           
abstract  Double getMinValue()
           
 Double getValue()
           
 boolean setValue(Double value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

param

protected Double param
Constructor Detail

CentralityParameter

public CentralityParameter()
Method Detail

askUserForValue

public boolean askUserForValue()
This method should be called to get the parameter from the user.

Returns:
the parameter value.

setValue

public boolean setValue(Double value)

getValue

public Double getValue()

askForValue

protected abstract Double askForValue()

getMinValue

public abstract Double getMinValue()

getMaxValue

public abstract Double getMaxValue()