All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jasima.shopSim.util.modelDef.streams.DblConstFactory Maven / Gradle / Ivy

Go to download

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.

There is a newer version: 1.3.0
Show newest version
package jasima.shopSim.util.modelDef.streams;

import jasima.core.util.Util;

import java.util.List;

public class DblConstFactory extends StreamDefFact {

	public DblConstFactory() {
		super();
	}

	@Override
	public String getTypeString() {
		return DblConstDef.getTypeString();
	}

	@Override
	public DblConstDef stringToStreamDef(String params, List errors) {
		double[] ll;
		try {
			ll = Util.parseDblList(params);
		} catch (NumberFormatException nfe) {
			errors.add(String.format("invalid number: %s",
					nfe.getLocalizedMessage()));
			return null;
		}

		DblConstDef res = new DblConstDef();
		res.setValues(ll);
		return res;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy