Package science.aist.neo4j.util
Class ValueCast
- java.lang.Object
-
- science.aist.neo4j.util.ValueCast
-
public class ValueCast extends Object
Util class to cast different values
- Since:
- 1.0
- Author:
- Andreas Pointner, Christoph Praschl
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T,S>
Tcast(S s)
Casts anything to anythingstatic <T> T
castToJavaLang(org.neo4j.driver.Value result, Class<T> clazz)
Casts a value return to a java language type
-
-
-
Method Detail
-
cast
public static <T,S> T cast(S s)
Casts anything to anything- Type Parameters:
T
- the type in which it gets castedS
- 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 castedclazz
- the class of the type in which it should be casted- Returns:
- the casted result value
-
-