com.ionetrics.lib.annotatorcomm
Class Timestamp

java.lang.Object
  extended by com.ionetrics.lib.annotatorcomm.Timestamp
All Implemented Interfaces:
java.lang.Comparable<Timestamp>
Direct Known Subclasses:
IrigBTimestamp, MicrosecondTimestamp

public abstract class Timestamp
extends java.lang.Object
implements java.lang.Comparable<Timestamp>

Timestamp


Constructor Summary
Timestamp()
           
 
Method Summary
 int compareTo(Timestamp timestamp)
          Compare timestamps for ordering.
 boolean equals(java.lang.Object obj)
          Compare the year, day, second, and microsecond for equality.
abstract  int getDayOfYear()
          Get the day of year.
 java.lang.String getExtendedFormatTime()
          Format the time and any extended information into a human readable String.
 java.lang.String getFormattedTime()
          Format the time into a human readable String.
 int getHourOfDay()
          Get the hour of day.
abstract  int getMicrosecond()
          Get the microsecond of the second.
 int getMinuteOfHour()
          Get the minute of the hour.
abstract  int getSecondOfDay()
          Get the second of the day.
 int getSecondOfMinute()
          Get the second of the minute.
abstract  int getYear()
          Get the year.
 int hashCode()
          OR the year, day of year, second of day, and microsecond together to for a hash.
 java.lang.String toString()
          Format the timestamp.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Timestamp

public Timestamp()
Method Detail

getYear

public abstract int getYear()
Get the year.

Returns:
year

getDayOfYear

public abstract int getDayOfYear()
Get the day of year.

Returns:
day

getSecondOfDay

public abstract int getSecondOfDay()
Get the second of the day.

Returns:
second

getHourOfDay

public int getHourOfDay()
Get the hour of day.

Returns:
hour

getMinuteOfHour

public int getMinuteOfHour()
Get the minute of the hour.

Returns:
minute

getSecondOfMinute

public int getSecondOfMinute()
Get the second of the minute.

Returns:
second

getMicrosecond

public abstract int getMicrosecond()
Get the microsecond of the second.

Returns:
microsecond

getFormattedTime

public java.lang.String getFormattedTime()
Format the time into a human readable String.

Returns:
human readable timestamp

getExtendedFormatTime

public java.lang.String getExtendedFormatTime()
Format the time and any extended information into a human readable String.

Returns:
human readable timestamp with extended information

hashCode

public int hashCode()
OR the year, day of year, second of day, and microsecond together to for a hash.

Overrides:
hashCode in class java.lang.Object
Returns:
hash

toString

public java.lang.String toString()
Format the timestamp.

Overrides:
toString in class java.lang.Object
Returns:
formated timestamp

equals

public boolean equals(java.lang.Object obj)
Compare the year, day, second, and microsecond for equality.

Overrides:
equals in class java.lang.Object
Parameters:
obj - other timestamp
Returns:
true if equal, false otherwise

compareTo

public int compareTo(Timestamp timestamp)
Compare timestamps for ordering.

Specified by:
compareTo in interface java.lang.Comparable<Timestamp>
Parameters:
timestamp - comparison target
Returns:
a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.


Copyright © 2006 Ionetrics Corp. All Rights Reserved.