public abstract class Values extends Object
Value
objects, and vice versa.
The long set of ofXXX
methods in this class are meant to be used as
arguments for methods like Value.asList(Function)
, MapAccessor.asMap(Function)
,
Record.asMap(Function)
and so on.Modifier and Type | Field and Description |
---|---|
static Value |
EmptyMap |
static Value |
NULL |
Modifier and Type | Method and Description |
---|---|
static org.neo4j.driver.v1.util.Function<Value,Boolean> |
ofBoolean()
Converts values to
Boolean . |
static org.neo4j.driver.v1.util.Function<Value,Double> |
ofDouble()
Converts values to
Double . |
static org.neo4j.driver.v1.util.Function<Value,org.neo4j.driver.v1.types.Entity> |
ofEntity()
Converts values to
Entity . |
static org.neo4j.driver.v1.util.Function<Value,Long> |
ofEntityId()
Converts values to
entity id . |
static org.neo4j.driver.v1.util.Function<Value,Float> |
ofFloat()
Converts values to
Float . |
static org.neo4j.driver.v1.util.Function<Value,Integer> |
ofInteger()
Converts values to
Integer . |
static org.neo4j.driver.v1.util.Function<Value,List<Object>> |
ofList()
|
static <T> org.neo4j.driver.v1.util.Function<Value,List<T>> |
ofList(org.neo4j.driver.v1.util.Function<Value,T> innerMap)
Converts values to
List of T. |
static org.neo4j.driver.v1.util.Function<Value,Long> |
ofLong()
Converts values to
Long . |
static org.neo4j.driver.v1.util.Function<Value,Map<String,Object>> |
ofMap()
Converts values to
Map . |
static <T> org.neo4j.driver.v1.util.Function<Value,Map<String,T>> |
ofMap(org.neo4j.driver.v1.util.Function<Value,T> valueConverter)
Converts values to
Map , with the map values further converted using
the provided converter. |
static org.neo4j.driver.v1.util.Function<Value,org.neo4j.driver.v1.types.Node> |
ofNode()
Converts values to
Node . |
static org.neo4j.driver.v1.util.Function<Value,Number> |
ofNumber()
Converts values to
Number . |
static org.neo4j.driver.v1.util.Function<Value,Object> |
ofObject()
Converts values to objects using
Value.asObject() . |
static org.neo4j.driver.v1.util.Function<Value,org.neo4j.driver.v1.types.Path> |
ofPath()
Converts values to
Path . |
static org.neo4j.driver.v1.util.Function<Value,org.neo4j.driver.v1.types.Relationship> |
ofRelationship()
Converts values to
Relationship . |
static org.neo4j.driver.v1.util.Function<Value,String> |
ofString()
Converts values to
String . |
static org.neo4j.driver.v1.util.Function<Value,String> |
ofToString()
Converts values using
Value.toString() , a human-readable string
description of any value. |
static org.neo4j.driver.v1.util.Function<Value,Value> |
ofValue()
The identity function for value conversion - returns the value untouched.
|
static Value |
parameters(Object... keysAndValues)
Helper function for creating a map of parameters, this can be used when you
run statements. |
static Value |
value(boolean... input) |
static Value |
value(boolean val) |
static Value |
value(double... input) |
static Value |
value(double val) |
static Value |
value(float... input) |
static Value |
value(int... input) |
static Value |
value(int val) |
static Value |
value(Iterable<Object> val) |
static Value |
value(Iterator<Object> val) |
static Value |
value(List<Object> vals) |
static Value |
value(long... input) |
static Value |
value(long val) |
static Value |
value(Map<String,Object> val) |
static Value |
value(Object value) |
static Value |
value(String... input) |
static Value |
value(String val) |
static Value |
value(Value... input) |
static Value[] |
values(Object... input) |
public static Value value(boolean... input)
public static Value value(long... input)
public static Value value(int... input)
public static Value value(double... input)
public static Value value(float... input)
public static Value value(long val)
public static Value value(int val)
public static Value value(double val)
public static Value value(boolean val)
public static Value parameters(Object... keysAndValues)
run
statements.
Allowed parameter types are:
keysAndValues
- alternating sequence of keys and valuesStatementRunner.run(String, Value)
public static org.neo4j.driver.v1.util.Function<Value,Value> ofValue()
public static org.neo4j.driver.v1.util.Function<Value,Object> ofObject()
Value.asObject()
.Value.asObject()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,Number> ofNumber()
Number
.Value.asNumber()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,String> ofString()
String
.
If you want to access a string you've retrieved from the database, this is
the right choice. If you want to print any value for human consumption, for
instance in a log, ofToString()
is the right choice.Value.asString()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,String> ofToString()
Value.toString()
, a human-readable string
description of any value.
This is different from ofString()
, which returns a java
String
value from a database TypeSystem.STRING()
.
If you are wanting to print any value for human consumption, this is the
right choice. If you are wanting to access a string value stored in the
database, you should use ofString()
.Value.toString()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,Integer> ofInteger()
Integer
.Value.asInt()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,Long> ofLong()
Long
.Value.asLong()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,Float> ofFloat()
Float
.Value.asFloat()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,Double> ofDouble()
Double
.Value.asDouble()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,Boolean> ofBoolean()
Boolean
.Value.asBoolean()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,Map<String,Object>> ofMap()
Map
.MapAccessor.asMap()
of a Value
public static <T> org.neo4j.driver.v1.util.Function<Value,Map<String,T>> ofMap(org.neo4j.driver.v1.util.Function<Value,T> valueConverter)
Map
, with the map values further converted using
the provided converter.T
- the type of values in the returned mapvalueConverter
- converter to use for the values of the mapMapAccessor.asMap(Function)
of a Value
public static org.neo4j.driver.v1.util.Function<Value,org.neo4j.driver.v1.types.Entity> ofEntity()
Entity
.Value.asEntity()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,Long> ofEntityId()
entity id
.Value
public static org.neo4j.driver.v1.util.Function<Value,org.neo4j.driver.v1.types.Node> ofNode()
Node
.Value.asNode()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,org.neo4j.driver.v1.types.Relationship> ofRelationship()
Relationship
.Value.asRelationship()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,org.neo4j.driver.v1.types.Path> ofPath()
Path
.Value.asPath()
of a Value
public static org.neo4j.driver.v1.util.Function<Value,List<Object>> ofList()
Value.asList()
of a Value
public static <T> org.neo4j.driver.v1.util.Function<Value,List<T>> ofList(org.neo4j.driver.v1.util.Function<Value,T> innerMap)
List
of T.T
- the type of values inside the listinnerMap
- converter for the values inside the listValue.asList(Function)
of a Value
Copyright © 2016. All rights reserved.