public static final class MockUtils.VirtualClock
extends java.time.Clock
Clock
that can be manipulated, to be used in tests.构造器和说明 |
---|
VirtualClock() |
VirtualClock(java.time.Instant initialInstant,
java.time.ZoneId zone) |
限定符和类型 | 方法和说明 |
---|---|
void |
advanceTimeBy(java.time.Duration duration) |
boolean |
equals(java.lang.Object obj) |
java.time.ZoneId |
getZone() |
int |
hashCode() |
java.time.Instant |
instant() |
long |
millis() |
void |
setInstant(java.time.Instant newFixedInstant) |
java.lang.String |
toString() |
java.time.Clock |
withZone(java.time.ZoneId zone) |
public VirtualClock(java.time.Instant initialInstant, java.time.ZoneId zone)
public VirtualClock()
public void setInstant(java.time.Instant newFixedInstant)
public void advanceTimeBy(java.time.Duration duration)
public java.time.ZoneId getZone()
getZone
在类中 java.time.Clock
public java.time.Clock withZone(java.time.ZoneId zone)
withZone
在类中 java.time.Clock
public long millis()
millis
在类中 java.time.Clock
public java.time.Instant instant()
instant
在类中 java.time.Clock
public boolean equals(java.lang.Object obj)
equals
在类中 java.time.Clock
public int hashCode()
hashCode
在类中 java.time.Clock
public java.lang.String toString()
toString
在类中 java.lang.Object