|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kitesdk.morphline.api.Record
public final class Record
A record is a set of named fields where each field has a list of one or more values.
A value can be of any type, i.e. any Java Object. That is, a record is a 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 Summary | |
---|---|
Record()
Creates a new empty record. |
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Record()
Method Detail |
---|
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)
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |