net.simplace.simulation.util.FWSimHelper

Helper instance consisting of helper methods with instances of an operation tree parser to evaluate rules while replacing parameters in variables


public class FWSimHelper {
// Public Constructors
public FWSimHelper();

// Constants
public static final Pattern PARAMPATTERN;
public static final Pattern PARAMSEARCHPATTERN;
public static final Pattern EXPRESSIONPATTERN;
public static final Pattern ARRAYVALUEPATTERN;
public static final Comparator SIM_VAR_COMARATOR;
// Class Variables
public static Comparator FIELD_COMPERATOR;

// Class Methods
public static String replaceParamTokens(FWSimVarMap aParamMap, String aValue,
Object aDefault);

replaces Parameters in
returns aNewValue
public static Object getValueFromSpecialParameter(FWSimVarMap aParamMap,
String aKey, Object aDefault);

getting parameter value from key if value is Map, Array, List or Date using '!' as a separator.
returns the new value object - if not retrieved the default.
public static Set getParametersFromString(Pattern pattern, String aString);


returns parameters from a given aString
public static LinkedHashMap ArrayToLinkedMap(Object[] aArray);

converts a Object[] to a LinkedHashMap
returns the fixed ordered tree map
public static TreeMap ArrayToMap(Double[] aArray);

converts a double[] to a tree map
returns the fixed ordered tree map
public static List findSimComponents();


returns a List of Strings representing the Classes extended from FWSimComponent
public static Collection findResources(String aPackage, String aRegexp);


returns a List of Strings representing the Classes extended from FWSimComponent
public static List findResourceTransformers();


returns a List of Strings representing the Classes extended from FWSimResourceTransformer
public static void showFields(FWSimFieldContainer aVertex);

public static void edit(FWSimFieldContainer aContainer, boolean aEnabled);

public static FWSimVariable.DATA_TYPE getDataTypeFromValue(String
aFirstValue);


returns the fitting data type
public static Object[][] getObjectArrayFromVarMap(FWSimVarMap aVarMap);


returns the Object Array containing keys and values of the data
public static String getParameterName(String aKey);


returns the first parameter in the key string
public static Object unzipArray(FWSimVariable aTargetVariable, ArrayList
aFieldMapIndizes, Object[] aSourceArray, Set aParametersFromString,
FWSimFieldContainer aContainer);

Implement rules for expressions like !UNZIP_KEYS(${C[])! = A[] !UNZIP_VALUES(${C[]})! = B[]
returns the unzipped array
public static Object zipArray(FWSimVariable aTargetVariable, ArrayList
aFieldMapIndizes, Object[] aSourceArray, Set aParametersFromString,
FWSimFieldContainer aContainer);

Implemented rules for expressions like !ZIP(${A[]},${B[]})! = C[]
returns the zipped Array


}