public class Measurement extends Object
XDRSentence
. Notice that any of the
fields may be empty (null
), depending on sentence and sensor
that produced it.Constructor and Description |
---|
Measurement()
Creates a new empty instance of Measurement.
|
Measurement(String type,
double value,
String units,
String name)
Creates a new instance of Measurement with given values.
|
Modifier and Type | Method and Description |
---|---|
String |
getName()
Returns the name of transducer.
|
String |
getType()
Returns the type of transducer.
|
String |
getUnits()
Returns the units of measurement.
|
double |
getValue()
Returns the measurement value.
|
boolean |
isEmpty()
Tells if all fields in this measurement are empty (null).
|
void |
setName(String name)
Sets the name of transducer.
|
void |
setType(String type)
Sets the type of measurement.
|
void |
setUnits(String units)
Sets the units of measurement.
|
void |
setValue(double value)
Sets the measurement value.
|
public String getName()
public String getType()
public String getUnits()
public double getValue()
public void setName(String name)
name
- Transducer name to setpublic void setType(String type)
type
- Type to setpublic void setUnits(String units)
units
- Units to set.public void setValue(double value)
value
- Value to setpublic boolean isEmpty()
Copyright (C) 2010-2017 Java Marine API authors. All Rights Reserved.