java.lang.Object
io.github.eggy03.ferrumx.windows.entity.battery.Battery

public class Battery extends Object
Immutable representation of a battery device on a Windows system.

Fields correspond to properties retrieved from the Win32_Battery WMI class.

Instances are inherently thread-safe and may be safely shared or cached across threads.

Usage example


 // Build a new battery instance
 Battery battery = Battery.builder()
     .deviceId("BAT0")
     .name("Primary Battery")
     .estimatedChargeRemaining(75)
     .build();

 // Modify using toBuilder (copy-on-write)
 Battery updated = battery.toBuilder()
     .estimatedChargeRemaining(50)
     .build();
 
Since:
2.0.0
Author:
Egg-03
See Also:
  • Constructor Details

    • Battery

      public Battery()
  • Method Details