@@ -0,0 +1,1069 @@
+/*%0A * JaamSim Discrete Event Simulation%0A * Copyright (C) 2015 Ausenco Engineering Canada Inc.%0A *%0A * This program is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * This program is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A */%0Apackage com.jaamsim.StringProviders;%0A%0Aimport com.jaamsim.Samples.SampleProvider;%0A%0Apublic class StringProvSample implements StringProvider %7B%0A%09private final SampleProvider samp;%0A%0A%09public StringProvSample(SampleProvider s) %7B%0A%09%09samp = s;%0A%09%7D%0A%0A%09@Override%0A%09public String getNextString(double simTime, String fmt, double siFactor) %7B%0A%09%09return String.format(fmt, samp.getNextSample(simTime)/siFactor);%0A%09%7D%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return samp.toString();%0A%09%7D%0A%0A%7D%0A

add StringProvSample to convert a SampleProvider into a StringProvider