If you think the Android project sunshine listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
package com.zmb.sunshine.data;
//fromwww.java2s.com/**
* A day of the week, such as 'Tuesday'.
*/publicenum DayOfWeek {
MONDAY(1),
TUESDAY(2),
WEDNESDAY(3),
THURSDAY(4),
FRIDAY(5),
SATURDAY(6),
SUNDAY(7);
finalint mValue;
private DayOfWeek(int value) {
mValue = value;
}
/**
* Returns the ISO-8601 value for the day.
* 1 (Monday) through 7 (Sunday).
* @return
*/publicint getValue() { return mValue; }
public String toString() {
switch (this) {
case MONDAY: return"Monday";
case TUESDAY: return"Tuesday";
case WEDNESDAY: return"Wednesday";
case THURSDAY: return"Thursday";
case FRIDAY: return"Friday";
case SATURDAY: return"Saturday";
case SUNDAY: return"Sunday";
default: return null;
}
}
}