The SUMO toolbox  2018a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Static Public Member Functions | List of all members
Util Class Reference

Misc. More...

Static Public Member Functions

static boolean isHeadless ()
 Is there a display hooked up. More...
 
static SamplePoint[] readSimulatorInput (InputStream in, int inDim, int outDim)
 A utility function for reading the input parameters passed to a java simulator on the command line. More...
 
static boolean isValidIdentifier (String name)
 
static byte[] getBytesFromFile (File file) throws IOException
 
static String getAbsolutePath (String name, String path)
 
static String generateOutputDirectoryName (String outputdir, String run_name, int run_nr, int numRuns, boolean isDeployed)
 Create a unique outputdirectory. More...
 
static String makeFilenameUnique (String name)
 
static SystemPlatform getPlatform ()
 getPlatform More...
 
static SystemPlatform resolvePlatformName (String systemName)
 
static SystemArchitecture getArchitecture ()
 getArchitecture More...
 
static SystemArchitecture resolveArchitectureName (String archName)
 
static String cleanFileSeparators (String path)
 Set all file separators to the one for the current platform. More...
 
static String genHash (String text)
 
static String getFileContent (String s)
 
static String getRandomPrefix ()
 
static int contains (String[] array, String s)
 
static String join (Collection< String > s, String delimiter)
 
static String join (String[] str, String delimiter)
 
static String doubleArrayToString (double[] list)
 
static String toString (Properties prop)
 
static String getWorkingDir ()
 
static String getDateTime ()
 
static void copyFile (String in, String out) throws IOException
 
static String getFileName (String path)
 
static void copyDirectory (File sourceLocation, File targetLocation) throws IOException
 
static InputStream PropertiesToInputStream (Properties p)
 
static void close (Closeable c)
 A utility method to close any stream. More...
 
static String arrayToString (Object array)
 
static void main (String[] args)
 

Detailed Description

Misc.

helper functions

Member Function Documentation

static String arrayToString ( Object  array)
inlinestatic
static String cleanFileSeparators ( String  path)
inlinestatic

Set all file separators to the one for the current platform.

Parameters
path
Returns
static void close ( Closeable  c)
inlinestatic

A utility method to close any stream.

static int contains ( String[]  array,
String  s 
)
inlinestatic
static void copyDirectory ( File  sourceLocation,
File  targetLocation 
) throws IOException
inlinestatic
static void copyFile ( String  in,
String  out 
) throws IOException
inlinestatic
static String doubleArrayToString ( double[]  list)
inlinestatic
static String generateOutputDirectoryName ( String  outputdir,
String  run_name,
int  run_nr,
int  numRuns,
boolean  isDeployed 
)
inlinestatic

Create a unique outputdirectory.

Returns
homedir
static String genHash ( String  text)
inlinestatic
static String getAbsolutePath ( String  name,
String  path 
)
inlinestatic
Parameters
name
Returns
static SystemArchitecture getArchitecture ( )
inlinestatic

getArchitecture

Parameters
return enum arch: defining the architecture
static byte [] getBytesFromFile ( File  file) throws IOException
inlinestatic
static String getDateTime ( )
inlinestatic
static String getFileContent ( String  s)
inlinestatic
static String getFileName ( String  path)
inlinestatic
static SystemPlatform getPlatform ( )
inlinestatic

getPlatform

Parameters
return enum platform: defining the platform
static String getRandomPrefix ( )
inlinestatic
static String getWorkingDir ( )
inlinestatic
static boolean isHeadless ( )
inlinestatic

Is there a display hooked up.

static boolean isValidIdentifier ( String  name)
inlinestatic
static String join ( Collection< String >  s,
String  delimiter 
)
inlinestatic
static String join ( String[]  str,
String  delimiter 
)
inlinestatic
static void main ( String[]  args)
inlinestatic
static String makeFilenameUnique ( String  name)
inlinestatic
static InputStream PropertiesToInputStream ( Properties  p)
inlinestatic
static SamplePoint [] readSimulatorInput ( InputStream  in,
int  inDim,
int  outDim 
)
inlinestatic

A utility function for reading the input parameters passed to a java simulator on the command line.

Parameters
inthe input stream to use
inDimthe number of inputs
outDimthe output dimension
Returns
the samplepoints read
static SystemArchitecture resolveArchitectureName ( String  archName)
inlinestatic
static SystemPlatform resolvePlatformName ( String  systemName)
inlinestatic
static String toString ( Properties  prop)
inlinestatic

The documentation for this class was generated from the following file: