com.unitech.lib.params

## Class BatteryStatus

- java.lang.Object
- - com.unitech.lib.params.BatteryStatus

-     public class BatteryStatus
      extends Object

  Represents the battery status of a device. This class encapsulates the battery percentage, charging state, and overall battery state. It also maintains a list of BatteryStatusIds to track which properties have been set.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `BatteryStatusId[]` | `batteryStatusIds`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BatteryStatus()`
    `BatteryStatus(BatteryState state)`
    `BatteryStatus(int percentage)`
    `BatteryStatus(int percentage, boolean charging)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getPercentage()`
    `BatteryState` | `getState()`
    `boolean` | `isCharging()`
    `boolean` | `isContains(BatteryStatusId statusId)` Checks if the BatteryStatus contains a specific BatteryStatusId.
    `void` | `setCharging(boolean charging)`
    `void` | `setPercentage(int percentage)`
    `void` | `setState(BatteryState state)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### batteryStatusIds

          public BatteryStatusId[] batteryStatusIds

  - ### Constructor Detail

    - #### BatteryStatus

          public BatteryStatus()

    - #### BatteryStatus

          public BatteryStatus(BatteryState state)

    - #### BatteryStatus

          public BatteryStatus(int percentage)

    - #### BatteryStatus

          public BatteryStatus(int percentage,
                               boolean charging)

  - ### Method Detail

    - #### getPercentage

          public int getPercentage()

    - #### setPercentage

          public void setPercentage(int percentage)

    - #### getState

          public BatteryState getState()

    - #### setState

          public void setState(BatteryState state)

    - #### isCharging

          public boolean isCharging()

    - #### setCharging

          public void setCharging(boolean charging)

    - #### isContains

          public boolean isContains(BatteryStatusId statusId)

      Checks if the BatteryStatus contains a specific BatteryStatusId.
      Parameters:
        `statusId` - The BatteryStatusId to check for.
      Returns:
        true if the statusId is contained, false otherwise.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`