org.norther.tammi.acorn.lang
Class LongDate

java.lang.Object
  extended by java.lang.Number
      extended by org.norther.tammi.acorn.lang.LongDate
All Implemented Interfaces:
Serializable, Comparable<Number>
Direct Known Subclasses:
LongTime

public class LongDate
extends Number
implements Comparable<Number>

A number representing a date as a number of milliseconds.

Version:
$Id: LongDate.java,v 1.11 2009/09/28 15:08:49 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Constructor Summary
LongDate(Date date)
          Constructs a new date with java.util.Date.
LongDate(long msecs)
          Constructs a new date with msecs.
LongDate(Number msecs)
          Constructs a new date with java.lang.Number.
 
Method Summary
 int compareTo(Number anotherLong)
           
 double doubleValue()
           
 boolean equals(Object obj)
           
 float floatValue()
           
 long getTimestamp()
          Gets the timestamp.
 int hashCode()
           
 int intValue()
           
 long longValue()
           
 String toString()
           
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongDate

public LongDate(long msecs)
Constructs a new date with msecs.

Parameters:
msecs - the milliseconds.

LongDate

public LongDate(Date date)
Constructs a new date with java.util.Date.

Parameters:
date - the date.

LongDate

public LongDate(Number msecs)
Constructs a new date with java.lang.Number.

Parameters:
msecs - the milliseconds.
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

compareTo

public int compareTo(Number anotherLong)
Specified by:
compareTo in interface Comparable<Number>

toString

public String toString()
Overrides:
toString in class Object

doubleValue

public double doubleValue()
Specified by:
doubleValue in class Number

floatValue

public float floatValue()
Specified by:
floatValue in class Number

intValue

public int intValue()
Specified by:
intValue in class Number

longValue

public long longValue()
Specified by:
longValue in class Number

getTimestamp

public long getTimestamp()
Gets the timestamp.

Returns:
the timestamp.


Copyright © 2004 The Norther Organization. All rights reserved.