PowerMetric.Type


public sealed class PowerMetric.Type


Configures the PowerMetric request.

Summary

Nested types

public final class PowerMetric.Type.Battery extends PowerMetric.Type
public final class PowerMetric.Type.Energy extends PowerMetric.Type
public final class PowerMetric.Type.Power extends PowerMetric.Type

Protected constructors

Public methods

final @NonNull Map<@NonNull PowerCategory, @NonNull PowerCategoryDisplayLevel>

A map which is used to configure which metrics are displayed.

final void

Protected constructors

Type

protected Type(
    @NonNull Map<@NonNull PowerCategory, @NonNull PowerCategoryDisplayLevel> categories
)
Parameters
@NonNull Map<@NonNull PowerCategory, @NonNull PowerCategoryDisplayLevel> categories

A map which is used to configure which metrics are displayed. The key is a PowerCategory enum, which configures the subsystem category that will be displayed. The value is a PowerCategoryDisplayLevel, which configures whether each subsystem in the category will have metrics displayed independently or summed for a total metric of the category.

Public methods

getCategories

Added in 1.2.0
public final @NonNull Map<@NonNull PowerCategory, @NonNull PowerCategoryDisplayLevelgetCategories()

A map which is used to configure which metrics are displayed. The key is a PowerCategory enum, which configures the subsystem category that will be displayed. The value is a PowerCategoryDisplayLevel, which configures whether each subsystem in the category will have metrics displayed independently or summed for a total metric of the category.

setCategories

public final void setCategories(
    @NonNull Map<@NonNull PowerCategory, @NonNull PowerCategoryDisplayLevel> categories
)
Parameters
@NonNull Map<@NonNull PowerCategory, @NonNull PowerCategoryDisplayLevel> categories

A map which is used to configure which metrics are displayed. The key is a PowerCategory enum, which configures the subsystem category that will be displayed. The value is a PowerCategoryDisplayLevel, which configures whether each subsystem in the category will have metrics displayed independently or summed for a total metric of the category.