Class FieldMapList
java.lang.Object
gov.nasa.pds.registry.common.util.FieldMapList
- All Implemented Interfaces:
FieldMap
Implementation of FieldMap interface which stores values in a list.
It preserves order and number of values in PDS label XML.
- Author:
- karpenko
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd field's valuevoidAdd multiple valuesvoidclear()Remove all the fields from the mapgetFirstValue(String fieldName) Get first value of a field.getNames()Get names of all fields in this map.Get all values of a field.booleanisEmpty()Check if map is empty.voidSet field's valuevoidSet field's valueintsize()Map size / number of fields.
-
Constructor Details
-
FieldMapList
public FieldMapList()Constructor
-
-
Method Details
-
size
public int size()Map size / number of fields. -
isEmpty
public boolean isEmpty()Check if map is empty. -
clear
public void clear()Remove all the fields from the map -
setValue
Set field's value- Parameters:
fieldName- field namevalue- field value
-
setValues
Set field's value- Parameters:
fieldName- field namevalues- field values
-
addValue
Add field's value -
addValues
Add multiple values -
getFirstValue
Get first value of a field.- Specified by:
getFirstValuein interfaceFieldMap
-
getValues
Get all values of a field. -
getNames
Get names of all fields in this map.
-