|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ka2ddo.yaac.ax25.Age
public class Age
This class represents a message parameter (in milliseconds) in a form that can be rendered easily on a GUI widget.
| Field Summary | |
|---|---|
static long |
HALF_HOUR_IN_MSEC
Convenience constant for the number of milliseconds in a half hour. |
| Constructor Summary | |
|---|---|
Age(long millisecondsOfAge)
Create an Age object with the specified number of milliseconds in its age. |
|
| Method Summary | |
|---|---|
int |
compareTo(Age o)
Test if this Age is older than another Age. |
static Age[] |
createAgeArray(long startInterval,
long maxDelta)
Create an array of Age objects covering the specified span of time in human-like spacings. |
boolean |
equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one. |
long |
getAge()
Get the delta time of this Age in milliseconds. |
int |
hashCode()
Returns a hash code value for the object. |
java.lang.String |
toString()
Display a human-friendly representation of this Age's time interval. |
java.lang.String |
toString(boolean showBackwardsTime)
Display a human-friendly representation of this Age's time interval. |
static java.lang.String |
toString(long age)
Display a delta time (in milliseconds) in a human friendly String. |
static java.lang.String |
toString(long age,
boolean showBackwardsTime)
Display a delta time (in milliseconds) in a human friendly String. |
static java.lang.String |
toString(long age,
boolean showBackwardsTime,
boolean spellOutUnits)
Display a delta time (in milliseconds) in a human friendly String. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final long HALF_HOUR_IN_MSEC
| Constructor Detail |
|---|
public Age(long millisecondsOfAge)
millisecondsOfAge - milliseconds of age| Method Detail |
|---|
public static Age[] createAgeArray(long startInterval,
long maxDelta)
startInterval - the smallest time interval in millisecondsmaxDelta - the largest time interval in milliseconds
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String toString(boolean showBackwardsTime)
showBackwardsTime - if boolean true and age is negative, show it as absolute, otherwise report "???"
public static java.lang.String toString(long age)
age - the delta time in milliseconds
public static java.lang.String toString(long age,
boolean showBackwardsTime)
age - the delta time in millisecondsshowBackwardsTime - if boolean true and age is negative, show it as absolute, otherwise report "???"
public static java.lang.String toString(long age,
boolean showBackwardsTime,
boolean spellOutUnits)
age - the delta time in millisecondsshowBackwardsTime - if boolean true and age is negative, show it as absolute, otherwise report "???"spellOutUnits - boolean true if spelled-out localized words for time units should be used instead of single English-unit letters
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - the reference object with which to compare.
true if this object is the same as the obj
argument; false otherwise.hashCode(),
Hashtablepublic int hashCode()
java.util.Hashtable.
hashCode in class java.lang.ObjectObject.equals(Object),
Hashtablepublic int compareTo(Age o)
compareTo in interface java.lang.Comparable<Age>o - other Age object to compare to this one
public long getAge()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||