Class ExponentialPar

All Implemented Interfaces:
AutoCheck, Parameter

public class ExponentialPar extends AbstractParameter implements Parameter
This is the parameter that should be passed to the Exponential distribution.

Copyright (c) 2003
Politecnico di Milano - dipartimento di Elettronica e Informazione
Author:
Fabrizio Frontera - ffrontera@yahoo.it
  • Constructor Summary

    Constructors
    Constructor
    Description
    It creates a new empty exponential parameter that must be set to be used.
    ExponentialPar(double lambda)
    It creates a new exponential parameter using the value provided by the user.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    It controls if the parameter is correct or not.
    double
    It returns the value of the parameter lambda of the exponential distribution.
    void
    setLambda(double lambda)
    It allows the user to modify the value of the parameter lambda of the exponential distribution and verify if the value is correct that is if it is greater than zero.
    void
    setMean(double value)
    Sets mean for a given distribution parameter.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • check

      public boolean check()
      It controls if the parameter is correct or not. For the exponential distribution, the parameter is right if lambda is greater than zero.
      Specified by:
      check in interface AutoCheck
      Specified by:
      check in interface Parameter
      Overrides:
      check in class AbstractParameter
      Returns:
      boolean indicating if the parameter is correct or not.
    • getLambda

      public double getLambda()
      It returns the value of the parameter lambda of the exponential distribution.
      Returns:
      double with lambda.
    • setLambda

      public void setLambda(double lambda) throws IncorrectDistributionParameterException
      It allows the user to modify the value of the parameter lambda of the exponential distribution and verify if the value is correct that is if it is greater than zero.
      Parameters:
      lambda - double indicating the new value of the parameter lambda.
      Throws:
      IncorrectDistributionParameterException - if the provided value is not greater than zero.
    • setMean

      public void setMean(double value) throws IncorrectDistributionParameterException
      Sets mean for a given distribution parameter. This method is required to adjust the mean value of a distribution into Load Dependent Service Time Strategy.
      Author: Bertoli Marco
      Specified by:
      setMean in interface Parameter
      Overrides:
      setMean in class AbstractParameter
      Parameters:
      value - New mean value for this distribution.
      Throws:
      IncorrectDistributionParameterException - if mean value is invalid for this distribution.