public final class Record extends Object
ListMultimap
as
in Guava’s ArrayListMultimap
. Note that a field can be multi-valued and that any two
records need not use common field names. This flexible data model corresponds exactly to the
characteristics of the Solr/Lucene data model (i.e. a record is a SolrInputDocument). A field
with zero values is removed from the record - it does not exist as such.Constructor and Description |
---|
Record()
Creates a new empty record.
|
Modifier and Type | Method and Description |
---|---|
Record |
copy()
Returns a shallow copy of this record.
|
boolean |
equals(Object other) |
List |
get(String key)
Returns a view of the values associated with the given key.
|
com.google.common.collect.ListMultimap<String,Object> |
getFields()
Returns the fields that are stored in this record.
|
Object |
getFirstValue(String key)
Returns the first value associated with the given key, or null if no such value exists
|
int |
hashCode() |
void |
put(String key,
Object value)
Adds the given value to the values currently associated with the given key.
|
void |
putIfAbsent(String key,
Object value)
Adds the given value to the values currently associated with the given key, iff the key isn't
already associated with that same value.
|
void |
removeAll(String key)
Removes all values that are associated with the given key
|
void |
replaceValues(String key,
Object value)
Removes all values that are associated with the given key, and then associates the given value
with the given key.
|
String |
toString() |
public Record copy()
public com.google.common.collect.ListMultimap<String,Object> getFields()
public List get(String key)
null.
public void put(String key, Object value)
public Object getFirstValue(String key)
public void replaceValues(String key, Object value)
public void removeAll(String key)
public void putIfAbsent(String key, Object value)
Copyright © 2013–2014. All rights reserved.