Companion

object Companion

Properties

Link copied to clipboard

Specific Expiry case that should never expire.

Link copied to clipboard

Specific Expiry case that should be tied the lifetime of the current session.

Link copied to clipboard

Specific Expiry case that should be tied the lifetime of the application launch.

Functions

Link copied to clipboard
fun afterDate(days: Int, hours: Int, minutes: Int, seconds: Int, fromTime: Long = getTimestamp()): Expiry
Link copied to clipboard
fun afterEpochTime(timeInSeconds: Long): Expiry

Allows you to set a specific Epoch time in seconds for which to expire.

Link copied to clipboard
fun afterTimeUnit(value: Long, unit: TimeUnit, fromTime: Long = getTimestamp()): Expiry
Link copied to clipboard

Creates an Expiry from a Long value. Long is assumed to be the Epoch Time in seconds, unless negative.

Link copied to clipboard

Helper to determine whether an Expiry object is classed as expired. Note. FOREVER and SESSION will always be false.