public class TimeStruct extends Object implements Comparable<TimeStruct>
| Modifier and Type | Field and Description |
|---|---|
long |
timeout
The timeout value
|
TimeUnit |
unit
The time unit value
|
| Constructor and Description |
|---|
TimeStruct(long timeout,
TimeUnit unit)
Creates a new instance
|
public long timeout
public TimeUnit unit
public TimeStruct(long timeout,
TimeUnit unit)
timeout - the timeout valueunit - the time unit valuepublic int compareTo(TimeStruct o)
The comparison is performed taking into account firstly the TimeUnit value and then if needed the timeout value
compareTo in interface Comparable<TimeStruct>Comparable.compareTo(java.lang.Object)Copyright © 2014. All Rights Reserved.