Class JulieNeo4jUtilities


  • public class JulieNeo4jUtilities
    extends Object
    • Constructor Detail

      • JulieNeo4jUtilities

        public JulieNeo4jUtilities()
    • Method Detail

      • convertElementsIntoArray

        public static Object[] convertElementsIntoArray​(Class<?> cls,
                                                        Object... elements)
        Converts elements into an array of the runtime type cls .
        Parameters:
        cls -
        elements -
        Returns:
      • convertArray

        public static Object[] convertArray​(Object value)
        Converts value to its correct runtime array type. Requires that value is an array of a Java base type (String, int, Double etc).
        Parameters:
        value - The array expressed as an object
        Returns:
        The same array but cast to the correct runtime element type.
      • convertListToArray

        public static <T> T[] convertListToArray​(List<T> list,
                                                 Class<?> cls)
      • findFirstValueInArray

        public static <T> int findFirstValueInArray​(T[] array,
                                                    T value)
        Expects an array that is filled with value from the right and returns the index of the first entry that equals value in the array performing a binary search. Returns -1 if the value was found.
        Parameters:
        array -
        Returns: