Package repast.simphony.data2.util
Class DataUtilities
java.lang.Object
repast.simphony.data2.util.DataUtilities
Static util methods for working with DataSetDescriptors etc.
- Author:
- Nick Collier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic List<DataSetDescriptor>getDataSetDescriptors(ControllerRegistry reg, Object contextId) Gets a list of the data set descriptors defined for the specified context.static booleanstatic booleanGets whether or not the specified data sources produces numeric data.static booleanGets whether or not the specified data sources produces numeric data.static voidrenameFileIfExists(String filename) Rename any existing file with the specified filename.
-
Constructor Details
-
DataUtilities
public DataUtilities()
-
-
Method Details
-
getDataSetDescriptors
public static List<DataSetDescriptor> getDataSetDescriptors(ControllerRegistry reg, Object contextId) Gets a list of the data set descriptors defined for the specified context.- Parameters:
reg-contextId-- Returns:
-
isNumeric
public static boolean isNumeric(CustomDataSourceDefinition def) throws ClassNotFoundException, InstantiationException, IllegalAccessException Gets whether or not the specified data sources produces numeric data.- Parameters:
def-- Returns:
- true if the data source produces numeric data, otherwise false.
- Throws:
ClassNotFoundExceptionInstantiationExceptionIllegalAccessException
-
isNumeric
-
isNumeric
Gets whether or not the specified data sources produces numeric data.- Parameters:
def-- Returns:
- true if the data source produces numeric data, otherwise false.
- Throws:
ClassNotFoundExceptionInstantiationExceptionIllegalAccessException
-
renameFileIfExists
Rename any existing file with the specified filename. This will append an incremented number to the filename until it won't clobber any existing files.- Parameters:
filename- the filename to rename if it exists
-