@Internal public class Deadline extends Object
now()
or from plus(Duration)
.Modifier and Type | Method and Description |
---|---|
static Deadline |
fromNow(java.time.Duration duration)
Constructs a Deadline that is a given duration after now.
|
boolean |
hasTimeLeft()
Returns whether there is any time left between the deadline and now.
|
boolean |
isOverdue()
Determines whether the deadline is in the past, i.e.
|
static Deadline |
now()
Constructs a
Deadline that has now as the deadline. |
Deadline |
plus(java.time.Duration other) |
java.time.Duration |
timeLeft()
Returns the time left between the deadline and now.
|
public Deadline plus(java.time.Duration other)
public java.time.Duration timeLeft()
public boolean hasTimeLeft()
public boolean isOverdue()
public static Deadline now()
Deadline
that has now as the deadline. Use this and then extend via
plus(Duration)
to specify a deadline in the future.public static Deadline fromNow(java.time.Duration duration)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.