|
CSC407 OOP Example | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--plan.dom.Priority
Implements a priority type of {high, med, low}
Field Summary | |
static Priority |
high
|
private int |
i
|
static Priority |
low
|
static Priority |
med
|
private static Priority[] |
prioObj
|
private static java.lang.String[] |
prioStr
|
Constructor Summary | |
private |
Priority(int i)
Private access so that only the instances defined above can exist. |
Method Summary | |
int |
compareTo(java.lang.Object o)
high > med > low |
boolean |
equals(java.lang.Object o)
tests for equality of this priority with the other |
static Priority |
get(java.lang.String name)
Return the priority object corresponding to the given name. |
java.lang.String |
toString()
converts to a standard string representation of priorities |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static Priority[] prioObj
private static java.lang.String[] prioStr
public static final Priority high
public static final Priority med
public static final Priority low
private int i
Constructor Detail |
private Priority(int i)
Method Detail |
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public static Priority get(java.lang.String name)
name
- the name of the priority level
|
CSC407 OOP Example | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |