Represents a local time with just hours and minutes. This class is based on the LocalTime
class (available on SDK 26 and higher).
Inherited Constant Summary
Public Constructor Summary
Public Method Summary
int | |
abstract int |
getHours()
Returns the hours in 24 hour format (0 <= return value < 24).
|
abstract int |
getMinutes()
Returns the minutes (0 <= return value < 60).
|
static LocalTime |
newInstance(int hours, int minutes)
Returns a
LocalTime instance given the hours and minutes. |
Inherited Method Summary
Public Constructors
public LocalTime ()
Public Methods
public abstract int getHours ()
Returns the hours in 24 hour format (0 <= return value < 24).
public abstract int getMinutes ()
Returns the minutes (0 <= return value < 60).
public static LocalTime newInstance (int hours, int minutes)
Returns a LocalTime
instance given the hours and minutes.
Parameters
hours | |
---|---|
minutes |
Throws
IllegalArgumentException | If parameters are out of range: 0 <= hours < 24, 0 <=
minutes < 60, i.e 00:00 to 23:59.
|
---|