Class UniformPar

All Implemented Interfaces:
AutoCheck, Parameter

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

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

    Constructors
    Constructor
    Description
    UniformPar(double min, double max)
    It creates a new uniform parameter using the bounds provided by the user.
    UniformPar(Double wmin, Double wmax)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    It verifies if the parameter is correct.
    double
    It returns the value of the maximum bound of the uniform distribution.
    double
    It returns the value of the minimum bound of the uniform distribution.
    void
    setMax(double max)
    It allows the user to change the maximum bound of the uniform distribution and verifies if it is correct.
    void
    setMean(double value)
    Sets mean for a given distribution parameter.
    void
    setMin(double min)
    It allows the user to change the minimum bound of the uniform distribution and verifies if it is correct.

    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 verifies if the parameter is correct. For the uniform distribution the parameter is right if the bounds are right which means that max must be greater than min.
      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.
    • getMin

      public double getMin()
      It returns the value of the minimum bound of the uniform distribution.
      Returns:
      double with the minimum bound of the distribution.
    • getMax

      public double getMax()
      It returns the value of the maximum bound of the uniform distribution.
      Returns:
      double with the maximum bound of the distribution.
    • setMin

      public void setMin(double min) throws IncorrectDistributionParameterException
      It allows the user to change the minimum bound of the uniform distribution and verifies if it is correct.
      Parameters:
      min - double indicating the new value of the minimum bound.
      Throws:
      IncorrectDistributionParameterException - if the provided value is not less than the maximum bound value.
    • setMax

      public void setMax(double max) throws IncorrectDistributionParameterException
      It allows the user to change the maximum bound of the uniform distribution and verifies if it is correct.
      Parameters:
      max - double indicating the new value of the maximum bound.
      Throws:
      IncorrectDistributionParameterException - if the provided value is not greater than the minimum bound value.
    • 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.