Class IDLabFunctions

    • Constructor Detail

      • IDLabFunctions

        public IDLabFunctions()
    • Method Detail

      • stringContainsOtherString

        public static boolean stringContainsOtherString​(String str,
                                                        String otherStr,
                                                        String delimiter)
      • listContainsElement

        public static boolean listContainsElement​(List list,
                                                  String str)
      • getMIMEType

        public static String getMIMEType​(String filename)
      • random

        public static String random()
      • toUpperCaseURL

        public static String toUpperCaseURL​(String test)
      • inRange

        public static boolean inRange​(Double testNumber,
                                      Double from,
                                      Double to)
        Tests whether a certain number is in a certain range. Everything is optional: - function returns false when testNumber is null - function only tests from constraint when to is null - function only tests to constraint when from is null - function returns true when from and to are null.
        Parameters:
        testNumber - The number put under the test. Optional (function returns false when is null)
        from - The number from where (inclusive)
        to - The number until where (exclusive)
        Returns:
        whether it's in range or not
      • isSet

        public static boolean isSet​(String valueParameter)
      • booleanMatch

        public static boolean booleanMatch​(String valueParameter,
                                           String regexParameter)
      • join2

        public static String join2​(String s1,
                                   String s2,
                                   String sep)
        Returns the string obtained by joining two strings `s1` and `s2` with the separator `sep`. For example, `join("foo", "bar", ";")` returns the string `foo;bar`.
        Parameters:
        s1 - string
        s2 - string
        sep - separator
        Returns:
        the string obtained by joining two strings `s1` and `s2` with the separator `sep`
      • normalizeDate

        public static String normalizeDate​(String s,
                                           String f)
        Returns `s` as a normalized xsd:date string, using `f` as current date form.
        Parameters:
        s - string
        f - format
        Returns:
        a normalized xsd:date string