org.apache.solr.client.solrj.io

## Class Tuple

- java.lang.Object
- - org.apache.solr.client.solrj.io.Tuple

- All Implemented Interfaces:
    Cloneable

      public class Tuple
      extends Object
      implements Cloneable

  A simple abstraction of a record containing key/value pairs. Convenience methods are provided for returning single and multiValue String, Long and Double values. Note that ints and floats are treated as longs and doubles respectively.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `EOF` When EOF field is true the Tuple marks the end of the stream.
    `boolean` | `EXCEPTION`
    `Map` | `fields`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Tuple(Map fields)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Tuple` | `clone()`
    `Object` | `get(Object key)`
    `Boolean` | `getBool(Object key)`
    `List<Boolean>` | `getBools(Object key)`
    `Date` | `getDate(Object key)`
    `List<Date>` | `getDates(Object key)`
    `Double` | `getDouble(Object key)`
    `List<Double>` | `getDoubles(Object key)`
    `String` | `getException()`
    `Long` | `getLong(Object key)`
    `List<Long>` | `getLongs(Object key)`
    `Map` | `getMap()`
    `List<Map>` | `getMaps(Object key)`
    `Map<String,Map>` | `getMetrics()`
    `String` | `getString(Object key)`
    `List<String>` | `getStrings(Object key)`
    `void` | `merge(Tuple other)`
    `void` | `put(Object key, Object value)`
    `void` | `remove(Object key)`
    `void` | `setMaps(Object key, List<Map> maps)`
    `void` | `setMetrics(Map<String,Map> metrics)`

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

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

- - ### Field Detail

    - #### EOF

          public boolean EOF

      When EOF field is true the Tuple marks the end of the stream. The EOF Tuple will not contain a record from the stream, but it may contain metrics/aggregates gathered by underlying streams.

    - #### EXCEPTION

          public boolean EXCEPTION

    - #### fields

          public Map fields

  - ### Constructor Detail

    - #### Tuple

          public Tuple(Map fields)

  - ### Method Detail

    - #### get

          public Object get(Object key)

    - #### put

          public void put(Object key,
                          Object value)

    - #### remove

          public void remove(Object key)

    - #### getString

          public String getString(Object key)

    - #### getException

          public String getException()

    - #### getLong

          public Long getLong(Object key)

    - #### getBool

          public Boolean getBool(Object key)

    - #### getBools

          public List<Boolean> getBools(Object key)

    - #### getDate

          public Date getDate(Object key)

    - #### getDates

          public List<Date> getDates(Object key)

    - #### getDouble

          public Double getDouble(Object key)

    - #### getStrings

          public List<String> getStrings(Object key)

    - #### getLongs

          public List<Long> getLongs(Object key)

    - #### getDoubles

          public List<Double> getDoubles(Object key)

    - #### getMap

          public Map getMap()

    - #### getMaps

          public List<Map> getMaps(Object key)

    - #### setMaps

          public void setMaps(Object key,
                              List<Map> maps)

    - #### getMetrics

          public Map<String,Map> getMetrics()

    - #### setMetrics

          public void setMetrics(Map<String,Map> metrics)

    - #### clone

          public Tuple clone()

      Overrides:
        `clone` in class `Object`

    - #### merge

          public void merge(Tuple other)

Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.