Class SystemDataTools

    • Method Detail

      • findParameterReferences

        public static ParameterRef[] findParameterReferences​(String parameterisedString)
        Finds all parameter references (see SystemDataConsumer) in the given string and returns them. This method will avoid returning duplicates (i.e. two parameter references that exactly match in name and type).

        This method will only recognise parameter references with data types that are supported by system/node parameters (INTEGER, FLOAT and STRING).

        Parameters:
        parameterisedString - a string, potentially containing variables / parameter references
        Returns:
        all parameter references found in the string
      • parseParameterReference

        public static ParameterRef parseParameterReference​(String parameterReference)
        Parses the specified string representation of a parameter reference (including the enclosing '%'s) and returns it as a ParameterRef object (or null if the reference is in any way illegal).

        This method will only recognise parameter references with data types that are supported by system/node parameters (INTEGER, FLOAT and STRING).

        Parameters:
        parameterReference - string representation of a parameter reference
        Returns:
        a parsed ParameterRef object or null if the reference is in any way illegal
      • getParser

        public static ParameterRefParser getParser​(String parameterisedString)
        Returns a parser for the specified parameterised string. The advantage compared to findParameterReferences(String) is that the parser provides position information (start and end index of parameter reference).

        This method will only recognise parameter references with data types that are supported by system/node parameters (INTEGER, FLOAT and STRING).

        Parameters:
        parameterisedString - the parameterised string to be formatted
        Returns:
        a formatter for the specified parameterised string
      • getReplacer

        public static ParameterRefReplacer getReplacer​(String parameterisedString)
        Returns a replacer for the specified parameterised string to replace parameter references with actual values.

        This method will only recognise parameter references with data types that are supported by system/node parameters (INTEGER, FLOAT and STRING).

        Parameters:
        parameterisedString - the parameterised string to be processed
        Returns:
        a replacer for the specified parameterised string
      • isCompatibleParameter

        public static boolean isCompatibleParameter​(ParameterRef paramRef,
                                                    Parameter parameter)
        Returns true, if the parameter reference and the given parameter are compatible.
        Parameters:
        paramRef - Parameter reference.
        parameter - Real parameter.
        Returns:
        True, if the parameter reference and the given parameter are compatible.