Class ValueCast


  • public class ValueCast
    extends Object

    Util class to cast different values

    Since:
    1.0
    Author:
    Andreas Pointner, Christoph Praschl
    • Method Detail

      • cast

        public static <T,​S> T cast​(S s)
        Casts anything to anything
        Type Parameters:
        T - the type in which it gets casted
        S - the input type
        Parameters:
        s - the element to cast
        Returns:
        the casted elemented
      • castToJavaLang

        public static <T> T castToJavaLang​(org.neo4j.driver.Value result,
                                           Class<T> clazz)
        Casts a value return to a java language type
        Type Parameters:
        T - the type in which it should be casted
        Parameters:
        result - the value which should be casted
        clazz - the class of the type in which it should be casted
        Returns:
        the casted result value