Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package as3.enum
- {
- {
- Day.MONDAY = new Day(new DayType("Monday", 2));
- }
- public class Day
- {
- static private var _MONDAY:Day;
- public static function get MONDAY():Day
- {
- return _MONDAY;
- }
- public static function set MONDAY(value:Day):void
- {
- if (null == value)
- return;
- _MONDAY = value;
- }
- public function Day(type:DayType=null)
- {
- if (!(type is DayType))
- {
- throw new Error("error");
- }
- }
- }
- }
- internal class DayType
- {
- public var day:String;
- public var weekday:Number;
- function DayType(dayStr:String, weekdayNum:Number):void
- {
- day = dayStr;
- weekday = weekdayNum;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement