Package org.apache.sis.internal.jaxb.gml
Class MeasureList
java.lang.Object
org.apache.sis.internal.jaxb.gml.MeasureList
XML representation of a sequence of measurement values together with their unit of measure.
This is used only at XML marshalling time.
- Since:
- 0.6
- Version:
- 0.6
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault empty constructor for JAXB.MeasureList(Object array, Class<E> elementType, javax.measure.Unit<?> unit) Creates a list of measures backed by the given array. -
Method Summary
-
Field Details
-
values
The measure values. -
unit
public javax.measure.Unit<?> unitThe unit of measurement.
-
-
Constructor Details
-
MeasureList
public MeasureList()Default empty constructor for JAXB. The value is initialized to null, but JAXB will overwrite that value if a XML value is present. -
MeasureList
Creates a list of measures backed by the given array.- Type Parameters:
E- compile-time value ofelementType.- Parameters:
array- the measure values as a Java array.elementType- the type of elements in the given array. Primitive type shall be replaced by their wrapper.unit- the unit of measurement.
-
-
Method Details
-
getUOM
Constructs a string representation of the units.- Returns:
- a string representation of the unit.
-
setUOM
Sets the unit of measure. This method is invoked by JAXB at unmarshalling time.- Parameters:
uom- the unit of measure as a string.- Throws:
URISyntaxException- if theuomlooks like a URI, but cannot be parsed.
-
toArray
public double[] toArray()Returns the values as an array.- Returns:
- the values, or
nullif none.
-