public final class Power implements Comparable


Represents a unit of power. Supported units:

Summary

Public methods

int
boolean
equals(Object other)
final double

Returns the power in kilocalories/day.

final double

Returns the power in Watts.

int
static final @NonNull Power
kilocaloriesPerDay(double value)

Creates Power with the specified value in kilocalories/day.

@NonNull String
static final @NonNull Power
watts(double value)

Creates Power with the specified value in Watts.

Public methods

compareTo

Added in 1.1.0-alpha07
public int compareTo(@NonNull Power other)

equals

public boolean equals(Object other)

getKilocaloriesPerDay

Added in 1.1.0-alpha07
public final double getKilocaloriesPerDay()

Returns the power in kilocalories/day.

getWatts

Added in 1.1.0-alpha07
public final double getWatts()

Returns the power in Watts.

hashCode

public int hashCode()

kilocaloriesPerDay

Added in 1.1.0-alpha07
public static final @NonNull Power kilocaloriesPerDay(double value)

Creates Power with the specified value in kilocalories/day.

toString

public @NonNull String toString()

watts

Added in 1.1.0-alpha07
public static final @NonNull Power watts(double value)

Creates Power with the specified value in Watts.