FreezePeriod


public class FreezePeriod
extends Object

java.lang.Object
   ↳ android.app.admin.FreezePeriod


A class that represents one freeze period which repeats annually. A freeze period has two java.time values that define the start and end dates of the period, both inclusive. If the end date is earlier than the start date, the period is considered wrapped around the year-end. As far as freeze period is concerned, leap year is disregarded and February 29th should be treated as if it were February 28th: so a freeze starting or ending on February 28th is identical to a freeze starting or ending on February 29th. When calulating the length of a freeze or the distance bewteen two freee periods, February 29th is also ignored.

Summary

Public constructors

FreezePeriod(MonthDay start, MonthDay end)

Creates a freeze period by its start and end dates.

Public methods

MonthDay getEnd()

Returns the end date (inclusive) of this freeze period.

MonthDay getStart()

Returns the start date (inclusive) of this freeze period.

String toString()

Returns a string representation of the object.

Inherited methods

Object clone()

Creates and returns a copy of this object.

boolean equals(Object obj)

Indicates whether some other object is "equal to" this one.

void finalize()

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.

final Class<?> getClass()

Returns the runtime class of this Object.

int hashCode()

Returns a hash code value for the object.

final void notify()

Wakes up a single thread that is waiting on this object's monitor.

final void notifyAll()

Wakes up all threads that are waiting on this object's monitor.

String toString()

Returns a string representation of the object.

final void wait(long timeoutMillis, int nanos)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait(long timeoutMillis)

Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.

final void wait()

Causes the current thread to wait until it is awakened, typically by being notified or interrupted.

Public constructors

FreezePeriod

Added in API level 28
public FreezePeriod (MonthDay start, 
                MonthDay end)

Creates a freeze period by its start and end dates. If the end date is earlier than the start date, the freeze period is considered wrapping year-end.

Parameters
start MonthDay

end MonthDay

Public methods

getEnd

Added in API level 28
public MonthDay getEnd ()

Returns the end date (inclusive) of this freeze period.

Returns
MonthDay

getStart

Added in API level 28
public MonthDay getStart ()

Returns the start date (inclusive) of this freeze period.

Returns
MonthDay

toString

Added in API level 28
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.