com.trackstudio.tools.formatter
Class HourFormatter

java.lang.Object
  extended by com.trackstudio.tools.formatter.HourFormatter
All Implemented Interfaces:
java.io.Serializable

public class HourFormatter
extends java.lang.Object
implements java.io.Serializable

This class provides operations with hours and minutes ;)

See Also:
Serialized Form

Constructor Summary
HourFormatter(float hours)
           
HourFormatter(java.lang.String hrs, java.lang.String mins, java.lang.String seconds)
           
 
Method Summary
 void add(float hrs)
           
 java.lang.Double DoubleValue()
           
 float floatValue()
           
 java.lang.Float FloatValue()
           
static java.lang.String format(java.lang.Object unformatted, java.lang.String format)
           
 java.lang.Integer getHours()
           
 java.lang.Integer getMinutes()
           
 java.lang.Integer getSeconds()
           
static void main(java.lang.String[] args)
           
 void sub(float hrs)
           
 java.lang.String toString(java.lang.String pattern)
          Example of patterns 'HH:MM', 'HH hh, MM mm', 'MM mm', 'HH',
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HourFormatter

public HourFormatter(java.lang.String hrs,
                     java.lang.String mins,
                     java.lang.String seconds)

HourFormatter

public HourFormatter(float hours)
Method Detail

getHours

public java.lang.Integer getHours()

getMinutes

public java.lang.Integer getMinutes()

getSeconds

public java.lang.Integer getSeconds()

floatValue

public float floatValue()

FloatValue

public java.lang.Float FloatValue()

DoubleValue

public java.lang.Double DoubleValue()

add

public void add(float hrs)
         throws java.lang.Exception
Throws:
java.lang.Exception

sub

public void sub(float hrs)
         throws java.lang.Exception
Throws:
java.lang.Exception

toString

public java.lang.String toString(java.lang.String pattern)
Example of patterns 'HH:MM', 'HH hh, MM mm', 'MM mm', 'HH',


format

public static java.lang.String format(java.lang.Object unformatted,
                                      java.lang.String format)
                               throws java.lang.Exception
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2002-2008 TrackStudio, Ltd. All Rights Reserved.