Duration.withSeconds

Returns a copy of this duration with the specified amount of seconds. !(p) This returns a duration with the specified seconds, retaining the nano-of-second part of this duration. !(p) This instance is immutable and unaffected by this method call.

@param seconds the seconds to represent, may be negative @return a {@code Duration} based on this period with the requested seconds, not null

class Duration
withSeconds
(
long seconds
)

Meta