com.myzeo.decoder
Class TimeChange

java.lang.Object
  extended by com.myzeo.decoder.TimeChange

public class TimeChange
extends java.lang.Object

Representation of when a time change occurred and what the new value of the time was. The clock or alarm time can be changed on the device. This class attempts to capture those time changes through saving the time that the event occurred along with the new time value.


Constructor Summary
TimeChange(long change_parm, long value_parm)
          Construct a time change value from the time the change occurred and with the new value.
 
Method Summary
 long getTime()
          Returns the timestamp for when value was changed (in seconds).
 java.util.Calendar getTimeAsCalendar()
          Returns the time for when value was changed (as a Calendar), or null.
 long getValue()
          Returns the value time was changed to (in seconds).
 java.util.Calendar getValueAsCalendar()
          Returns the value time was changed to (as a Calendar), or null.
 java.lang.String toString()
          Generates a string representation of the time change.
 java.lang.String toXML()
          Generates an XML string representation of the time change.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeChange

public TimeChange(long change_parm,
                  long value_parm)
Construct a time change value from the time the change occurred and with the new value.

Parameters:
change_parm - A UNIX timestamp that represents when the time change occurred.
value_parm - The new value for the clock.
Method Detail

getTime

public long getTime()
Returns the timestamp for when value was changed (in seconds).

Returns:
the timestamp for when value was changed (in seconds).

getTimeAsCalendar

public java.util.Calendar getTimeAsCalendar()
Returns the time for when value was changed (as a Calendar), or null.

Returns:
the time for when value was changed (as a Calendar), or null.

getValue

public long getValue()
Returns the value time was changed to (in seconds).

Returns:
the value time was changed to (in seconds).

getValueAsCalendar

public java.util.Calendar getValueAsCalendar()
Returns the value time was changed to (as a Calendar), or null.

Returns:
the value time was changed to (as a Calendar), or null.

toString

public java.lang.String toString()
Generates a string representation of the time change.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the time change.

toXML

public java.lang.String toXML()
Generates an XML string representation of the time change.

Returns:
an XML string that captures the time change.

Copyright © 2010, Zeo, Inc. All rights reserved.