|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.melloware.jukes.util.TimeSpanUnit
public final class TimeSpanUnit
The TimeSpanUnit defines a standard set of units to be used with the TimeSpan class. The methods of the TimeSpan class require the use of TimeSpanUnit objects for certain methods. The purpose of this class is to provide a typesafe enum. (see java.util.logging.Level for an example from the Java API.)
The TimeSpanUnit objects are:
| Field Summary | |
|---|---|
static TimeSpanUnit |
DAYS
DAYS indicates that days are being used |
static TimeSpanUnit |
HOURS
HOURS indicates that hours are being used |
static TimeSpanUnit |
MILLISECONDS
MILLISECONDS indicates that milliseconds are being used |
static TimeSpanUnit |
MINUTES
MINUTES indicates that minutes are being used |
static TimeSpanUnit |
SECONDS
SECONDS indicates that seconds are being used |
| Method Summary | |
|---|---|
boolean |
equals(Object aObj)
|
int |
getName()
Gets the name of this TimeSpanUnit. |
int |
getValue()
Gets the number of milliseconds this TimeSpanUnit represents. |
int |
hashCode()
Returns a hash code value for the object. |
String |
toString()
Returns a string representation of the object in the format "name:value" |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final TimeSpanUnit MILLISECONDS
public static final TimeSpanUnit SECONDS
public static final TimeSpanUnit MINUTES
public static final TimeSpanUnit HOURS
public static final TimeSpanUnit DAYS
| Method Detail |
|---|
public int getName()
public int getValue()
public int hashCode()
java.util.Hashtable. The method returns the value
of the TimeSpanUnit.
hashCode in class ObjectObject.equals(java.lang.Object),
Hashtablepublic String toString()
toString in class Objectpublic boolean equals(Object aObj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||