Package repast.simphony.parameter
Class ParametersWriter
- java.lang.Object
-
- repast.simphony.parameter.ParametersWriter
-
public class ParametersWriter extends Object
Writes the current values of a Parameters object out to an xml file. The format consists of a name value pair where the value is a string representation of parameter value. For example,<parameters type="valuesOnly"> <parameter name="double" value="3.2343"/> </parameters>
The full parameter format provides the full parameter definition, including the name, type, defaultValue, and optionally the displayName, value constraints, and isReadOnly. If the type is a non-primitive (number, boolean or String), then a converter must also be specified. For example,
<parameters> ...finish example </parameters>
- Author:
- Nick Collier, Michelle Kehrer
-
-
Constructor Summary
Constructors Constructor Description ParametersWriter()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
void
writeSpecificationToFile(Parameters params, File file)
void
writeSpecificationToFile(Parameters params, Map<String,Double> displayOrder, File file)
void
writeValuesToFile(Parameters params, File file)
String
writeValuesToString(Parameters params)
-
-
-
Method Detail
-
writeValuesToString
public String writeValuesToString(Parameters params) throws IOException
- Throws:
IOException
-
writeValuesToFile
public void writeValuesToFile(Parameters params, File file) throws IOException
- Throws:
IOException
-
writeSpecificationToFile
public void writeSpecificationToFile(Parameters params, Map<String,Double> displayOrder, File file) throws IOException
- Throws:
IOException
-
writeSpecificationToFile
public void writeSpecificationToFile(Parameters params, File file) throws IOException
- Throws:
IOException
-
main
public static void main(String[] args)
-
-