com.hazelcast.query.extractor

## Class ValueReader

- java.lang.Object
- - com.hazelcast.query.extractor.ValueReader

-     public abstract class ValueReader
      extends Object

  Enables reading the value of the attribute specified by the path

  The path may be:

  1. simple -> it includes a single attribute only, like "name"
  2. nested -> it includes more than a single attribute separated with a dot (.), e.g. "person.address.city"
  The path may also include array elements:
  1. specific quantifier, like "person.leg[1]" -> returns the leg with index 1
  2. wildcard quantifier, like "person.leg[any]" -> returns all legs

  The wildcard quantifier may be used multiple times, like "person.leg[any].finger[any]" which returns all fingers from all legs.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValueReader()`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract <T> void` | `read(String path, ValueCallback<T> callback)` Read the value of the attribute specified by the path and returns the result via the callback.
    `abstract <T> void` | `read(String path, ValueCollector<T> collector)` Read the value of the attribute specified by the path and returns the result directly to the collector.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ValueReader

          public ValueReader()

  - ### Method Detail

    - #### read

          public abstract <T> void read(String path,
                                        ValueCallback<T> callback)
                                 throws ValueReadingException

      Read the value of the attribute specified by the path and returns the result via the callback.
      Type Parameters:
        `T` - Type of the value to read
      Parameters:
        `path` - attribute to read the value from
        `callback` - callback to call with the value. May be called more than once in case of wildcards.
      Throws:
        `ValueReadingException` - in case of any reading errors. If an exception occurs the callback won't be called at all

    - #### read

          public abstract <T> void read(String path,
                                        ValueCollector<T> collector)
                                 throws ValueReadingException

      Read the value of the attribute specified by the path and returns the result directly to the collector.
      Type Parameters:
        `T` - Type of the value to read
      Parameters:
        `path` - attribute to read the value from
        `collector` - collector to collect the result with. May collect more than one result in case of wildcards.
      Throws:
        `ValueReadingException` - in case of any reading errors. If an exception occurs the collector won't be called at all

Copyright © 2019. All rights reserved.