
jasima.shopSim.util.modelDef.streams.IntUniformDef Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jasima-main Show documentation
Show all versions of jasima-main Show documentation
JAva SImulatior for MAnufacturing and logistics - A framework for discrete event simulation and computer experiments with a main focus on modelling and analyzing logistic/manufacturing systems.
package jasima.shopSim.util.modelDef.streams;
import jasima.core.random.continuous.DblStream;
import jasima.core.random.discrete.IntUniformRange;
public class IntUniformDef extends StreamDef {
public static final String PARAM_MAX_VALUE = "maxValue";
public static final String PARAM_MIN_VALUE = "minValue";
public static final String TYPE_STRING = "dblUnif";
private int minValue = 0;
private int maxValue = 10;
public IntUniformDef() {
super();
}
public static String getTypeString() {
return TYPE_STRING;
}
@Override
public String toString() {
return String.format("%s(%d,%d)", getTypeString(), getMinValue(),
getMaxValue());
}
@Override
public DblStream createStream() {
return new IntUniformRange(getMinValue(), getMaxValue());
}
public int getMinValue() {
return minValue;
}
public void setMinValue(int minValue) {
firePropertyChange(PARAM_MIN_VALUE, this.minValue,
this.minValue = minValue);
}
public int getMaxValue() {
return maxValue;
}
public void setMaxValue(int maxValue) {
firePropertyChange(PARAM_MAX_VALUE, this.maxValue,
this.maxValue = maxValue);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy