Package org.apache.solr.client.solrj.io
Class Tuple
- java.lang.Object
-
- org.apache.solr.client.solrj.io.Tuple
-
- All Implemented Interfaces:
Cloneable,MapSerializable,MapWriter,NavigableObject
- Direct Known Subclasses:
KmeansEvaluator.ClusterTuple,KnnRegressionEvaluator.KnnRegressionTuple,LoessEvaluator.LoessRegressionTuple,OLSRegressionEvaluator.MultipleRegressionTuple,RegressionEvaluator.RegressionTuple
public class Tuple extends Object implements Cloneable, MapWriter
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.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.solr.common.MapWriter
MapWriter.EntryWriter
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tupleclone()Objectget(Object key)BooleangetBool(Object key)List<Boolean>getBools(Object key)DategetDate(Object key)List<Date>getDates(Object key)DoublegetDouble(Object key)List<Double>getDoubles(Object key)StringgetException()LonggetLong(Object key)List<Long>getLongs(Object key)MapgetMap()List<Map>getMaps(Object key)Map<String,Map>getMetrics()StringgetString(Object key)List<String>getStrings(Object key)voidmerge(Tuple other)voidput(Object key, Object value)voidremove(Object key)voidsetMaps(Object key, List<Map> maps)voidsetMetrics(Map<String,Map> metrics)voidwriteMap(MapWriter.EntryWriter ew)-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.solr.common.NavigableObject
_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStr
-
-
-
-
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()
-
Tuple
public Tuple(Map fields)
-
-
Method Detail
-
remove
public void remove(Object key)
-
getException
public String getException()
-
getMap
public Map getMap()
-
merge
public void merge(Tuple other)
-
writeMap
public void writeMap(MapWriter.EntryWriter ew) throws IOException
- Specified by:
writeMapin interfaceMapWriter- Throws:
IOException
-
-