com.liferay.portal.kernel.cal
Class Duration

java.lang.Object
  extended by com.liferay.portal.kernel.cal.Duration
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Duration
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

View Source

Author:
Jonathan Lennox
See Also:
Serialized Form

Constructor Summary
Duration()
          Constructor Duration
Duration(int w)
          Constructor Duration
Duration(int h, int m, int s)
          Constructor Duration
Duration(int d, int h, int m, int s)
          Constructor Duration
 
Method Summary
protected  void checkNonWeeksOkay(int f)
          Method checkNonWeeksOkay
protected  void checkWeeksOkay(int f)
          Method checkWeeksOkay
 void clear()
          Method clear
 java.lang.Object clone()
          Method clone
 int getDays()
          Method getDays
 int getHours()
          Method getHours
 long getInterval()
          Method getInterval
 int getMinutes()
          Method getMinutes
 int getSeconds()
          Method getSeconds
 int getWeeks()
          Method getWeeks
protected  void normalize()
          Method normalize
 void setDays(int d)
          Method setDays
 void setHours(int h)
          Method setHours
 void setInterval(long millis)
          Method setInterval
 void setMinutes(int m)
          Method setMinutes
 void setSeconds(int s)
          Method setSeconds
 void setWeeks(int w)
          Method setWeeks
 java.lang.String toString()
          Method toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Duration

public Duration()
Constructor Duration


Duration

public Duration(int d,
                int h,
                int m,
                int s)
Constructor Duration

Parameters:
d -
h -
m -
s -

Duration

public Duration(int h,
                int m,
                int s)
Constructor Duration

Parameters:
h -
m -
s -

Duration

public Duration(int w)
Constructor Duration

Parameters:
w -
Method Detail

clear

public void clear()
Method clear


getWeeks

public int getWeeks()
Method getWeeks

Returns:
int

setWeeks

public void setWeeks(int w)
Method setWeeks

Parameters:
w -

getDays

public int getDays()
Method getDays

Returns:
int

setDays

public void setDays(int d)
Method setDays

Parameters:
d -

getHours

public int getHours()
Method getHours

Returns:
int

setHours

public void setHours(int h)
Method setHours

Parameters:
h -

getMinutes

public int getMinutes()
Method getMinutes

Returns:
int

setMinutes

public void setMinutes(int m)
Method setMinutes

Parameters:
m -

getSeconds

public int getSeconds()
Method getSeconds

Returns:
int

setSeconds

public void setSeconds(int s)
Method setSeconds

Parameters:
s -

getInterval

public long getInterval()
Method getInterval

Returns:
long

setInterval

public void setInterval(long millis)
Method setInterval

Parameters:
millis -

normalize

protected void normalize()
Method normalize


checkWeeksOkay

protected void checkWeeksOkay(int f)
Method checkWeeksOkay

Parameters:
f -

checkNonWeeksOkay

protected void checkNonWeeksOkay(int f)
Method checkNonWeeksOkay

Parameters:
f -

clone

public java.lang.Object clone()
Method clone

Overrides:
clone in class java.lang.Object
Returns:
Object

toString

public java.lang.String toString()
Method toString

Overrides:
toString in class java.lang.Object
Returns:
String