ValueContext (Neo4j Community 2.1.0-M01 API)
Date: 2014-02-20

org.neo4j.index.lucene

## Class ValueContext

- java.lang.Object
- - 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

    Constructors
    Constructor and Description
    `ValueContext(Object value)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `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(org.neo4j.graphdb.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(org.neo4j.graphdb.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(org.neo4j.graphdb.PropertyContainer, String, Object)`

Copyright © 2002–2014 The Neo4j Graph Database Project. All rights reserved.