public final class BloodGlucose implements Comparable


Represents a unit of blood glucose level (glycaemia). Supported units:

Summary

Public methods

int
boolean
equals(Object other)
final double

Returns the blood glucose level concentration in mg/dL.

final double

Returns the blood glucose level in mmol/L.

int
static final @NonNull BloodGlucose
milligramsPerDeciliter(double value)

Creates BloodGlucose with the specified value in mg/dL.

static final @NonNull BloodGlucose
millimolesPerLiter(double value)

Creates BloodGlucose with the specified value in mmol/L.

@NonNull String

Public methods

compareTo

Added in 1.1.0-alpha10
public int compareTo(@NonNull BloodGlucose other)

equals

public boolean equals(Object other)

getMilligramsPerDeciliter

Added in 1.1.0-alpha10
public final double getMilligramsPerDeciliter()

Returns the blood glucose level concentration in mg/dL.

getMillimolesPerLiter

Added in 1.1.0-alpha10
public final double getMillimolesPerLiter()

Returns the blood glucose level in mmol/L.

hashCode

public int hashCode()

milligramsPerDeciliter

Added in 1.1.0-alpha10
public static final @NonNull BloodGlucose milligramsPerDeciliter(double value)

Creates BloodGlucose with the specified value in mg/dL.

millimolesPerLiter

Added in 1.1.0-alpha10
public static final @NonNull BloodGlucose millimolesPerLiter(double value)

Creates BloodGlucose with the specified value in mmol/L.

toString

public @NonNull String toString()