Package org.gitlab4j.api.models
Class Duration
- java.lang.Object
-
- org.gitlab4j.api.models.Duration
-
public class Duration extends Object
This class represents a duration in time.
-
-
Method Summary
Modifier and Type Method Description static DurationforValue(String value)intgetSeconds()Get the number of seconds this duration represents.voidsetSeconds(int seconds)Set the number of seconds this duration represents.StringtoString()
-
-
-
Constructor Detail
-
Duration
public Duration(String durationString)
Create a Duration instance from a human readable string. e.g: 3h30m- Parameters:
durationString- a duration in human readable format
-
Duration
public Duration(int seconds)
Create a Duration instance from a number of seconds.- Parameters:
seconds- the number of seconds for this Duration instance to represent
-
-
Method Detail
-
getSeconds
public int getSeconds()
Get the number of seconds this duration represents.- Returns:
- the number of seconds this duration represents
-
setSeconds
public void setSeconds(int seconds)
Set the number of seconds this duration represents.- Parameters:
seconds- the number of seconds this duration represents
-
-