Neo4j

org.neo4j.index.lucene
Class ValueContext

java.lang.Object
  extended by org.neo4j.index.lucene.ValueContext

public class ValueContext
extends Object

ValueContext allows you to give not just a value, but to give the value some context to live in.


Constructor Summary
ValueContext(Object value)
           
 
Method Summary
 Object getCorrectValue()
          Returns the string representation of the value given in the constructor, or the unmodified value if indexNumeric() has been called.
 Object getValue()
           
 ValueContext indexNumeric()
          Returns a ValueContext to be used with Index.add(PropertyContainer, String, Object)
static ValueContext numeric(Number value)
          Convience method to add a numeric value to an index.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueContext

public ValueContext(Object value)
Method Detail

getValue

public Object getValue()
Returns:
the value object specified in the constructor.

indexNumeric

public ValueContext indexNumeric()
Returns a ValueContext to be used with Index.add(PropertyContainer, String, Object)

Returns:
a numeric ValueContext

getCorrectValue

public Object getCorrectValue()
Returns the string representation of the value given in the constructor, or the unmodified value if indexNumeric() has been called.

Returns:
the, by the user, intended value to index.

toString

public String toString()
Overrides:
toString in class Object

numeric

public static ValueContext numeric(Number value)
Convience method to add a numeric value to an index.

Parameters:
value - The value to add
Returns:
A ValueContext that can be used with Index.add(PropertyContainer, String, Object)

Neo4j

Copyright © 2002-2014 The Neo4j Graph Database Project. All Rights Reserved.