public class JobRow extends LinkedHashMap<JobField,String>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Modifier | Constructor and Description |
|---|---|
|
JobRow(JobField jobIdFieldName,
Map<JobField,String> fieldValueMap)
Builds a row of job metadata.
|
protected |
JobRow(String jobId,
Map<JobField,String> fieldValueMap)
An internal-only constructor that provides the jobId directly, used by the copy-and-modify methods.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getId() |
Map<String,String> |
getRowMap()
Coerces the JobRow into a mapping from the names of JobFields to their values.
|
int |
hashCode()
The hash code of a job row is simply the hash code of its ID.
|
String |
toString() |
JobRow |
withFieldValue(JobField field,
String value)
Returns a copy of this JobRow with the specified field set to the specified value.
|
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, removeEldestEntry, replaceAll, valuesclone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizefinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeprotected JobRow(@NotNull
String jobId,
Map<JobField,String> fieldValueMap)
jobId - The unique identifier for this jobfieldValueMap - The metadata about this jobIllegalArgumentException - if jobId is not a key in fieldValueMappublic JobRow(@NotNull
JobField jobIdFieldName,
@NotNull
Map<JobField,String> fieldValueMap)
jobIdFieldName - The field used as a key into the rowfieldValueMap - A mapping from job fields to job metadata values, must contain the jobId as a keyIllegalArgumentException - if jobId is not a key in fieldValueMappublic Map<String,String> getRowMap()
public JobRow withFieldValue(JobField field, String value)
field - The field to setvalue - The value to set the field topublic String getId()
public int hashCode()
public boolean equals(Object o)
public String toString()
toString in class AbstractMap<JobField,String>Copyright © 2016–2018 Yahoo! Inc.. All rights reserved.