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
-
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 boolean
static boolean
Gets whether or not the specified data sources produces numeric data.static boolean
Gets whether or not the specified data sources produces numeric data.static void
renameFileIfExists
(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:
ClassNotFoundException
InstantiationException
IllegalAccessException
-
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:
ClassNotFoundException
InstantiationException
IllegalAccessException
-
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
-