Seconds

com.typesafe.play.cachecontrol.Seconds
See theSeconds companion class
object Seconds

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Seconds.type

Members list

Type members

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def between(startInclusive: Temporal, endInclusive: Temporal): Seconds

Creates a Seconds representing the number of whole seconds between the two specified datetimes.

Creates a Seconds representing the number of whole seconds between the two specified datetimes.

Value parameters

endInclusive

the end instant, must not be null

startInclusive

the start instant, must not be null

Attributes

Returns

the period in seconds

Throws
IllegalArgumentException

if the instants are null or invalid

def ofDuration(duration: Duration): Seconds

Obtains an instance of Seconds. This will actually only use the seconds of a java.time.Duration.

Obtains an instance of Seconds. This will actually only use the seconds of a java.time.Duration.

Value parameters

duration

the duration

Attributes

Returns

the instance of Seconds

def parse(periodStr: String): Seconds

Creates a new Seconds by parsing a string in the ISO8601 format 'PTnS'.

Creates a new Seconds by parsing a string in the ISO8601 format 'PTnS'.

The parse will accept the full ISO syntax of PnYnMnWnDTnHnMnS however only the seconds component may be non-zero. If any other component is non-zero, an exception will be thrown.

Value parameters

periodStr

the period string, null returns zero

Attributes

Returns

the period in seconds

Throws
IllegalArgumentException

if the string format is invalid

def seconds(seconds: Long): Seconds

Obtains an instance of Seconds.

Obtains an instance of Seconds.

Value parameters

seconds

the number of seconds to obtain an instance for

Attributes

Returns

the instance of Seconds

Concrete fields

val ZERO: Seconds

Constant representing zero seconds.

Constant representing zero seconds.

Attributes

Implicits

Implicits

implicit def fromDurationToSecond(duration: Duration): Seconds

implicit that will only use the seconds part of a duration

implicit that will only use the seconds part of a duration

Attributes