程序包 cn.vorbote.time
类 TimeSpan
- java.lang.Object
-
- cn.vorbote.time.TimeSpan
-
public class TimeSpan extends Object
Represents a time interval. We use this class to show diffs from 2DateTimeinstances.- 作者:
- vorbote thills@vorbote.cn
-
-
构造器概要
构造器 构造器 说明 TimeSpan()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 intgetDays()Getter for fielddays.intgetHours()Getter for fieldhours.intgetMilliseconds()Getter for fieldmilliseconds.intgetMinutes()Getter for fieldminutes.intgetSeconds()Getter for fieldseconds.protected voidsetDays(int days)Setter for fielddays.protected voidsetHours(int hours)Setter for fieldhours.protected voidsetMilliseconds(int milliseconds)Setter for fieldmilliseconds.protected voidsetMinutes(int minutes)Setter for fieldminutes.protected voidsetSeconds(int seconds)Setter for fieldseconds.StringtoString()longTotalMilliseconds()Get the total milliseconds in thisTimeSpan.longTotalSeconds()Get the total seconds in thisTimeSpan.
-
-
-
方法详细资料
-
getDays
public int getDays()
Getter for fielddays.- 返回:
- The value of
days.
-
getHours
public int getHours()
Getter for fieldhours.- 返回:
- The value of
hours.
-
getMinutes
public int getMinutes()
Getter for fieldminutes.- 返回:
- The value of
minutes.
-
getSeconds
public int getSeconds()
Getter for fieldseconds.- 返回:
- The value of
seconds.
-
getMilliseconds
public int getMilliseconds()
Getter for fieldmilliseconds.- 返回:
- The value of
milliseconds.
-
setDays
protected void setDays(int days)
Setter for fielddays.- 参数:
days- The value ofdays.
-
setHours
protected void setHours(int hours)
Setter for fieldhours.- 参数:
hours- The value ofhours.
-
setMinutes
protected void setMinutes(int minutes)
Setter for fieldminutes.- 参数:
minutes- The value ofminutes.
-
setSeconds
protected void setSeconds(int seconds)
Setter for fieldseconds.- 参数:
seconds- The value ofseconds.
-
setMilliseconds
protected void setMilliseconds(int milliseconds)
Setter for fieldmilliseconds.- 参数:
milliseconds- The value ofmilliseconds.
-
TotalSeconds
public long TotalSeconds()
Get the total seconds in thisTimeSpan.- 返回:
- The total seconds in this
TimeSpan.
-
TotalMilliseconds
public long TotalMilliseconds()
Get the total milliseconds in thisTimeSpan.- 返回:
- The total milliseconds in this
TimeSpan.
-
-