Class Measurement
- java.lang.Object
-
- ubic.gemma.model.common.AbstractIdentifiable
-
- ubic.gemma.model.common.measurement.Measurement
-
- All Implemented Interfaces:
Identifiable
public class Measurement extends AbstractIdentifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMeasurement.Factory
-
Constructor Summary
Constructors Constructor Description Measurement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Important note: Two objects with the same class and non-null ID must be considered equal.MeasurementKindgetKindCV()StringgetOtherKind()PrimitiveTypegetRepresentation()MeasurementTypegetType()UnitgetUnit()StringgetValue()doublegetValueAsDouble()Retrieve the value of this measurement as a double.floatgetValueAsFloat()intgetValueAsInt()longgetValueAsLong()inthashCode()Important note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.voidsetKindCV(MeasurementKind kindCV)voidsetOtherKind(String otherKind)voidsetRepresentation(PrimitiveType representation)voidsetType(MeasurementType type)voidsetUnit(Unit unit)voidsetValue(String value)voidsetValueAsDouble(double value)StringtoString()-
Methods inherited from class ubic.gemma.model.common.AbstractIdentifiable
getId, setId
-
-
-
-
Method Detail
-
getKindCV
public MeasurementKind getKindCV()
-
setKindCV
public void setKindCV(MeasurementKind kindCV)
-
getOtherKind
public String getOtherKind()
-
setOtherKind
public void setOtherKind(String otherKind)
-
getRepresentation
public PrimitiveType getRepresentation()
-
setRepresentation
public void setRepresentation(PrimitiveType representation)
-
getType
public MeasurementType getType()
-
setType
public void setType(MeasurementType type)
-
getUnit
public Unit getUnit()
-
setUnit
public void setUnit(Unit unit)
-
getValueAsInt
public int getValueAsInt()
-
getValueAsLong
public long getValueAsLong()
-
getValueAsFloat
public float getValueAsFloat()
-
getValueAsDouble
public double getValueAsDouble()
Retrieve the value of this measurement as a double.Any missing value (i.e. null) will be returned as a
Double.NaN.
-
setValueAsDouble
public void setValueAsDouble(double value)
-
hashCode
public int hashCode()
Description copied from class:AbstractIdentifiableImportant note: Never use the ID in the hashCode() implementation since it can be assigned when the object is persisted.- Specified by:
hashCodein classAbstractIdentifiable
-
equals
public boolean equals(Object obj)
Description copied from class:AbstractIdentifiableImportant note: Two objects with the same class and non-null ID must be considered equal. If one or both IDs are nulls, the rest of the state can be used to determine equality.- Specified by:
equalsin classAbstractIdentifiable
-
toString
public String toString()
- Overrides:
toStringin classAbstractIdentifiable
-
-