Enum SleepStageSupport
- All Implemented Interfaces:
Comparable<SleepStageSupport>
How much stage detail a SleepSample actually carries.
A queryable fact rather than something to infer from the data, because the three cases need different UI and the difference is not the app's fault: a phone-inferred session and a watch-recorded one are the same type carrying different fidelity.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAsleep and awake spans only, with no breakdown of the asleep time.No stage intervals at all -- the session knows when it started and ended and nothing else.A real hypnogram: at least one ofSleepStage.LIGHT,SleepStage.CORE,SleepStage.DEEPorSleepStage.REM. -
Method Summary
Modifier and TypeMethodDescriptionstatic SleepStageSupportReturns the enum constant of this type with the specified name.static SleepStageSupport[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
NONE
No stage intervals at all -- the session knows when it started and ended and nothing else. -
ASLEEP_AWAKE
Asleep and awake spans only, with no breakdown of the asleep time. A phone-inferred session, or an iOS session recorded before the stage values arrived in iOS 16. -
STAGED
A real hypnogram: at least one ofSleepStage.LIGHT,SleepStage.CORE,SleepStage.DEEPorSleepStage.REM.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-