|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.sonar.api.utils.Duration
public class Duration
Field Summary | |
---|---|
static String |
DAY
|
static String |
HOUR
|
static String |
MINUTE
|
Method Summary | |
---|---|
Duration |
add(Duration with)
Add the given duration to the current one. |
static Duration |
create(long durationInMinutes)
Create a Duration from a number of minutes. |
static Duration |
decode(String text,
int hoursInDay)
Create a Duration from a text duration and the number of hours in a day. |
String |
encode(int hoursInDay)
Return the duration in text, by using the given hours in day parameter to process hours. |
boolean |
equals(Object o)
|
int |
hashCode()
|
boolean |
isGreaterThan(Duration other)
Return true if the given duration is greater than the current one. |
Duration |
multiply(int factor)
Multiply the duration with the given factor. |
Duration |
subtract(Duration with)
Subtract the given duration to the current one. |
long |
toMinutes()
Return the duration in minutes. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String DAY
public static final String HOUR
public static final String MINUTE
Method Detail |
---|
public static Duration create(long durationInMinutes)
public static Duration decode(String text, int hoursInDay)
public String encode(int hoursInDay)
public long toMinutes()
public boolean isGreaterThan(Duration other)
public Duration add(Duration with)
public Duration subtract(Duration with)
public Duration multiply(int factor)
public boolean equals(Object o)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |