org.openqa.selenium.support.ui
Class Duration
java.lang.Object
org.openqa.selenium.support.ui.Duration
public class Duration
- extends java.lang.Object
Represents an immutable duration of time.
Constructor Summary |
Duration(long time,
java.util.concurrent.TimeUnit unit)
|
Method Summary |
boolean |
equals(java.lang.Object o)
|
int |
hashCode()
|
long |
in(java.util.concurrent.TimeUnit unit)
Converts this durtation to the given unit of time. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Duration
public Duration(long time,
java.util.concurrent.TimeUnit unit)
- Parameters:
time
- The amount of time.unit
- The unit of time.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
in
public long in(java.util.concurrent.TimeUnit unit)
- Converts this durtation to the given unit of time.
- Parameters:
unit
- The time unit to convert to.
- Returns:
- The value ofthis duration in the specified unit of time.
Copyright © 2011. All Rights Reserved.