class Dse::Graph::Duration
Represents a duration of time, corresponding to the Duration datatype in DSE Graph. In DSE Graph, this type is represented by the Java 8 Duration type.
Inherits
Object
Methods
new
(days, hours, minutes, seconds)Create a Dse::Graph::Duration
object. All arguments are internally coerced to desired types.
parse
(duration)Parse a duration string from DSE Graph and construct a Dse::Graph::Duration
object
days
read or writeDays in duration of time. May be negative. Is internally coerced to an integer,
so a value being assigned need not be an Integer
itself.
hours
read or writeHours in duration of time. May be negative. Is internally coerced to an integer,
so a value being assigned need not be an Integer
itself.
minutes
read or writeMinutes in duration of time. May be negative. Is internally coerced to an integer,
so a value being assigned need not be an Integer
itself.
seconds
read or writeSeconds in duration of time. May be negative. Is internally coerced to an float,
so a value being assigned need not be an Float
itself.
to_s
A string formatted as PnDTnHnMn.nS
, where n
is a number that goes with the character code following it.
D - days
H - hours
M - minutes
S - seconds
as_seconds
Returns this Dse::Graph::Duration
object converted to seconds