Class HKWorkout

    • Constructor Detail

      • HKWorkout

        protected HKWorkout​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(java.lang.Object aTarget,
                                                                                 org.moe.natj.objc.SEL aSelector,
                                                                                 java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        public static NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • workoutWithActivityTypeStartDateEndDate

        public static HKWorkout workoutWithActivityTypeStartDateEndDate​(long workoutActivityType,
                                                                        NSDate startDate,
                                                                        NSDate endDate)
        workoutWithActivityType:startDate:endDate:
        Parameters:
        workoutActivityType - The activity type of the workout
        startDate - The point in time that the workout was started
        endDate - The point in time that the workout was ended
      • workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceDeviceMetadata

        public static HKWorkout workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceDeviceMetadata​(long workoutActivityType,
                                                                                                                            NSDate startDate,
                                                                                                                            NSDate endDate,
                                                                                                                            double duration,
                                                                                                                            HKQuantity totalEnergyBurned,
                                                                                                                            HKQuantity totalDistance,
                                                                                                                            HKDevice device,
                                                                                                                            NSDictionary<java.lang.String,​?> metadata)
        workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:device:metadata: If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.
        Parameters:
        workoutActivityType - The activity type of the workout
        startDate - The point in time that the workout was started
        endDate - The point in time that the workout was ended
        duration - The duration of the workout. If 0, the difference between startDate and endDate is used.
        totalEnergyBurned - The amount of energy that was burned during the workout. (Optional)
        totalDistance - The total distance that was traveled during the workout. (Optional)
        device - The HKDevice associated with the workout. (Optional)
        metadata - Metadata for the workout. (Optional)
      • workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceMetadata

        public static HKWorkout workoutWithActivityTypeStartDateEndDateDurationTotalEnergyBurnedTotalDistanceMetadata​(long workoutActivityType,
                                                                                                                      NSDate startDate,
                                                                                                                      NSDate endDate,
                                                                                                                      double duration,
                                                                                                                      HKQuantity totalEnergyBurned,
                                                                                                                      HKQuantity totalDistance,
                                                                                                                      NSDictionary<java.lang.String,​?> metadata)
        workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:metadata: If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.
        Parameters:
        workoutActivityType - The activity type of the workout
        startDate - The point in time that the workout was started
        endDate - The point in time that the workout was ended
        duration - The duration of the workout. If 0, the difference between startDate and endDate is used.
        totalEnergyBurned - The amount of energy that was burned during the workout. (Optional)
        totalDistance - The total distance that was traveled during the workout. (Optional)
        metadata - Metadata for the workout. (Optional)
      • workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceDeviceMetadata

        public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceDeviceMetadata​(long workoutActivityType,
                                                                                                                                 NSDate startDate,
                                                                                                                                 NSDate endDate,
                                                                                                                                 NSArray<? extends HKWorkoutEvent> workoutEvents,
                                                                                                                                 HKQuantity totalEnergyBurned,
                                                                                                                                 HKQuantity totalDistance,
                                                                                                                                 HKDevice device,
                                                                                                                                 NSDictionary<java.lang.String,​?> metadata)
        workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:metadata If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.
        Parameters:
        workoutActivityType - The activity type of the workout
        startDate - The point in time that the workout was started
        endDate - The point in time that the workout was ended
        workoutEvents - An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)
        totalEnergyBurned - The amount of energy that was burned during the workout. (Optional)
        totalDistance - The total distance that was traveled during the workout. (Optional)
        device - The HKDevice associated with the workout. (Optional)
        metadata - Metadata for the workout. (Optional)
      • workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceMetadata

        public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceMetadata​(long workoutActivityType,
                                                                                                                           NSDate startDate,
                                                                                                                           NSDate endDate,
                                                                                                                           NSArray<? extends HKWorkoutEvent> workoutEvents,
                                                                                                                           HKQuantity totalEnergyBurned,
                                                                                                                           HKQuantity totalDistance,
                                                                                                                           NSDictionary<java.lang.String,​?> metadata)
        workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:metadata If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.
        Parameters:
        workoutActivityType - The activity type of the workout
        startDate - The point in time that the workout was started
        endDate - The point in time that the workout was ended
        workoutEvents - An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)
        totalEnergyBurned - The amount of energy that was burned during the workout. (Optional)
        totalDistance - The total distance that was traveled during the workout. (Optional)
        metadata - Metadata for the workout. (Optional)
      • workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalSwimmingStrokeCountDeviceMetadata

        public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalSwimmingStrokeCountDeviceMetadata​(long workoutActivityType,
                                                                                                                                                         NSDate startDate,
                                                                                                                                                         NSDate endDate,
                                                                                                                                                         NSArray<? extends HKWorkoutEvent> workoutEvents,
                                                                                                                                                         HKQuantity totalEnergyBurned,
                                                                                                                                                         HKQuantity totalDistance,
                                                                                                                                                         HKQuantity totalSwimmingStrokeCount,
                                                                                                                                                         HKDevice device,
                                                                                                                                                         NSDictionary<java.lang.String,​?> metadata)
        workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalSwimmingStrokeCount:device:metadata: If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.
        Parameters:
        workoutActivityType - The activity type of the workout
        startDate - The point in time that the workout was started
        endDate - The point in time that the workout was ended
        workoutEvents - An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)
        totalEnergyBurned - The amount of energy that was burned during the workout. (Optional)
        totalDistance - The total distance that was traveled during the workout. (Optional)
        totalSwimmingStrokeCount - The total count of swimming strokes that was accumulated during the workout. (Optional)
        device - The HKDevice associated with the workout. (Optional)
        metadata - Metadata for the workout. (Optional)
      • duration

        public double duration()
        [@property] duration The length of time that a workout was recording The duration is derived from the start and end dates of the workout and takes into account periods that the workout was paused. Periods that the workout was paused are based off of the workoutEvents property.
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
        Overrides:
        _supportsSecureCoding in class HKSample
      • totalDistance

        public HKQuantity totalDistance()
        [@property] totalDistance The total distance that was traveled during a workout This metric should represent the total distance traveled during the course of the workout. It should be a quantity with a unit representing length.
      • totalEnergyBurned

        public HKQuantity totalEnergyBurned()
        [@property] totalEnergyBurned The amount of energy that was burned during a workout This metric should represent the total active energy burned during the course of the workout. It should be a quantity with a unit representing energy.
      • totalSwimmingStrokeCount

        public HKQuantity totalSwimmingStrokeCount()
        [@property] totalSwimmingStrokeCount The total count of swimming strokes that was accumulated during a workout This metric should represent the total count of swimming strokes accumulated during the course of the workout. It should be a quantity with a unit representing count.
      • workoutActivityType

        public long workoutActivityType()
        [@property] workoutActivityType Represents the activity that the user was performing during a workout
      • workoutEvents

        public NSArray<? extends HKWorkoutEvent> workoutEvents()
        [@property] workoutEvents An array of HKWorkoutEvents that occurred during a workout. These events will be ordered by date in ascending order. All events must take place between the start date and end date of the workout. The first workout event should never be a resume event because it is assumed that the workout begins in a running state.
      • totalFlightsClimbed

        public HKQuantity totalFlightsClimbed()
        [@property] totalFlightsClimbed The total count of flights climbed during a workout This metric should represent the total count of flights accumulated during the course of the workout. It should be a quantity with a unit representing count.
      • workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalFlightsClimbedDeviceMetadata

        public static HKWorkout workoutWithActivityTypeStartDateEndDateWorkoutEventsTotalEnergyBurnedTotalDistanceTotalFlightsClimbedDeviceMetadata​(long workoutActivityType,
                                                                                                                                                    NSDate startDate,
                                                                                                                                                    NSDate endDate,
                                                                                                                                                    NSArray<? extends HKWorkoutEvent> workoutEvents,
                                                                                                                                                    HKQuantity totalEnergyBurned,
                                                                                                                                                    HKQuantity totalDistance,
                                                                                                                                                    HKQuantity totalFlightsClimbed,
                                                                                                                                                    HKDevice device,
                                                                                                                                                    NSDictionary<java.lang.String,​?> metadata)
        workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalFlightsClimbed:device:metadata: If the optional total parameters are specified, matching samples that add up to the calculated total quantities should be associated with this workout using addSamples:toWorkout:completion: in HKHealthStore.
        Parameters:
        workoutActivityType - The activity type of the workout
        startDate - The point in time that the workout was started
        endDate - The point in time that the workout was ended
        workoutEvents - An array of HKWorkoutEvents. The workout's duration is derived from these events. (Optional)
        totalEnergyBurned - The amount of energy that was burned during the workout. (Optional)
        totalDistance - The total distance that was traveled during the workout. (Optional)
        totalFlightsClimbed - The total count of flights climbed that was accumulated during the workout. (Optional)
        device - The HKDevice associated with the workout. (Optional)
        metadata - Metadata for the workout. (Optional)