Class ConstantSetter<T>

java.lang.Object
repast.simphony.parameter.ConstantSetter<T>
All Implemented Interfaces:
ParameterSetter

public class ConstantSetter<T> extends Object implements ParameterSetter
A ParameterSetter that will set a parameter to a given value. This always returns true on on its atEnd() method.
Author:
Jerry Vos
  • Field Details

    • parameterName

      protected String parameterName
  • Constructor Details

    • ConstantSetter

      public ConstantSetter()
    • ConstantSetter

      public ConstantSetter(String parameterName, T constant)
      Constructs this to set the given parameter to the given value.
      Parameters:
      parameterName - the name of the parameter
      constant - the value to set the parameter to
  • Method Details

    • getParameterName

      public String getParameterName()
      Gets the name of the parameter that this setter should set.
      Returns:
      the name of the parameter that this setter should set.
    • reset

      public void reset(Parameters params)
      Sets the constant parameter value
      Specified by:
      reset in interface ParameterSetter
    • atEnd

      public boolean atEnd()
      Returns true.
      Specified by:
      atEnd in interface ParameterSetter
    • next

      public void next(Parameters params)
      Sets its specified value to its specified parameter name.
      Specified by:
      next in interface ParameterSetter
      Parameters:
      params - the parameters object