org.sape.carbon.core.util.calendar
Class MonthEnum

java.lang.Object
  |
  +--org.sape.carbon.core.util.enum.BaseEnum
        |
        +--org.sape.carbon.core.util.calendar.MonthEnum
All Implemented Interfaces:
Serializable

public final class MonthEnum
extends BaseEnum
implements Serializable

A simple enumeration for the seven days of the week. The ordinal values for each day are based off of the Calendar class. Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.6 $($Author: dvoet $ / $Date: 2003/05/05 21:21:22 $)
Author:
Doug Voet, June 2002
See Also:
Serialized Form

Nested Class Summary
static class MonthEnum.MonthEnumNotFoundException
          This class is a typesafe retriever exception for an enumeration
 
Nested classes inherited from class org.sape.carbon.core.util.enum.BaseEnum
 
Field Summary
static MonthEnum APRIL
           
static MonthEnum AUGUST
           
static MonthEnum DECEMBER
           
static MonthEnum FEBRUARY
           
static MonthEnum JANUARY
           
static MonthEnum JULY
           
static MonthEnum JUNE
           
static MonthEnum MARCH
           
static MonthEnum MAY
           
static MonthEnum NOVEMBER
           
static MonthEnum OCTOBER
           
static MonthEnum SEPTEMBER
           
 
Fields inherited from class org.sape.carbon.core.util.enum.BaseEnum
name, ordinal
 
Constructor Summary
private MonthEnum(String name, int ordinal)
          Constructor for MonthEnum.
 
Method Summary
static MonthEnum getByName(String name)
          Strongly typed enum retriever
static MonthEnum getByOrdinal(int ordinal)
          Strongly typed enum retriever
(package private)  Object readResolve()
          Overrides part of serialization to return a reference to an existing static Enumeration
 
Methods inherited from class org.sape.carbon.core.util.enum.BaseEnum
equals, getByName, getByOrdinal, getName, getOrdinal, hashCode, iterator, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

JANUARY

public static final MonthEnum JANUARY
See Also:
Calendar.JANUARY

FEBRUARY

public static final MonthEnum FEBRUARY
See Also:
Calendar.FEBRUARY

MARCH

public static final MonthEnum MARCH
See Also:
Calendar.MARCH

APRIL

public static final MonthEnum APRIL
See Also:
Calendar.APRIL

MAY

public static final MonthEnum MAY
See Also:
Calendar.MAY

JUNE

public static final MonthEnum JUNE
See Also:
Calendar.JUNE

JULY

public static final MonthEnum JULY
See Also:
Calendar.JULY

AUGUST

public static final MonthEnum AUGUST
See Also:
Calendar.AUGUST

SEPTEMBER

public static final MonthEnum SEPTEMBER
See Also:
Calendar.SEPTEMBER

OCTOBER

public static final MonthEnum OCTOBER
See Also:
Calendar.OCTOBER

NOVEMBER

public static final MonthEnum NOVEMBER
See Also:
Calendar.NOVEMBER

DECEMBER

public static final MonthEnum DECEMBER
See Also:
Calendar.DECEMBER
Constructor Detail

MonthEnum

private MonthEnum(String name,
                  int ordinal)
Constructor for MonthEnum.

Parameters:
name - the name of the month
ordinal - the numeric value representing the month
Method Detail

getByName

public static final MonthEnum getByName(String name)
                                 throws MonthEnum.MonthEnumNotFoundException
Strongly typed enum retriever

MonthEnum.MonthEnumNotFoundException

getByOrdinal

public static final MonthEnum getByOrdinal(int ordinal)
                                    throws MonthEnum.MonthEnumNotFoundException
Strongly typed enum retriever

MonthEnum.MonthEnumNotFoundException

readResolve

final Object readResolve()
                  throws ObjectStreamException
Overrides part of serialization to return a reference to an existing static Enumeration

ObjectStreamException


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.