org.openqa.selenium.support.ui
Class Duration

java.lang.Object
  extended by org.openqa.selenium.support.ui.Duration

public class Duration
extends Object

Represents an immutable duration of time.


Constructor Summary
Duration(long time, TimeUnit unit)
           
 
Method Summary
 boolean equals(Object o)
           
 int hashCode()
           
 long in(TimeUnit unit)
          Converts this durtation to the given unit of time.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Duration

public Duration(long time,
                TimeUnit unit)
Parameters:
time - The amount of time.
unit - The unit of time.
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

in

public long in(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 © 2013. All Rights Reserved.