net.ponec.jworksheet.bo.item
Class Time

Package class diagram package Time
java.lang.Object
  extended by net.ponec.jworksheet.bo.item.Time
All Implemented Interfaces:
java.lang.Comparable, UjoCloneable, ValueTextable

public class Time
extends java.lang.Object
implements java.lang.Comparable, ValueTextable, UjoCloneable

Time


Field Summary
static java.lang.String SEPARATOR
          Separator
static int VALUE_MAX
           
static int VALUE_MIN
           
 
Constructor Summary
Time(boolean systemTime)
          Creates a new instance of a System Time.
Time(int minutes)
          Creates a new instance of a System Time.
Time(java.lang.String time)
          Creates a new instance of Time
 
Method Summary
 void addHour(float aHours)
           
 void addMinute(int minutes)
           
 java.lang.Object clone(int depth, java.lang.Object context)
          Returns a clone
 Time cloneAdd(int period)
          Add some minutes to a new Time instance.
 int compareTo(java.lang.Object obj)
           
 boolean equals(java.lang.Object obj)
           
 int getMinutes()
          Return minutes
 short getTimeMinutes()
          Returns Time in minutes.
 void setTime(int minutes)
           
 void setTime(int hourse, int minute)
           
 void setTimeFromSystem()
          Assign a system time.
 short substract(Time time)
          Result [minutes]: this - time.
 java.lang.String toString()
           
protected  void valid(int minutes)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SEPARATOR

public static final java.lang.String SEPARATOR
Separator

See Also:
Constant Field Values

VALUE_MIN

public static int VALUE_MIN

VALUE_MAX

public static int VALUE_MAX
Constructor Detail

Time

public Time(java.lang.String time)
Creates a new instance of Time

Parameters:
time - Format 23:56

Time

public Time(int minutes)
Creates a new instance of a System Time.


Time

public Time(boolean systemTime)
Creates a new instance of a System Time.

Method Detail

setTimeFromSystem

public void setTimeFromSystem()
Assign a system time.


setTime

public void setTime(int hourse,
                    int minute)

setTime

public void setTime(int minutes)

getTimeMinutes

public short getTimeMinutes()
Returns Time in minutes.


valid

protected void valid(int minutes)

addMinute

public void addMinute(int minutes)

addHour

public void addHour(float aHours)

substract

public short substract(Time time)
Result [minutes]: this - time.


getMinutes

public int getMinutes()
Return minutes


toString

public java.lang.String toString()
Specified by:
toString in interface ValueTextable
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)
Specified by:
compareTo in interface java.lang.Comparable

cloneAdd

public Time cloneAdd(int period)
Add some minutes to a new Time instance.


clone

public java.lang.Object clone(int depth,
                              java.lang.Object context)
Returns a clone

Specified by:
clone in interface UjoCloneable


Copyright © 2007-2009 PPonec