|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.displaytag.properties.MediaTypeEnum
public final class MediaTypeEnum
Enumeration for media types.
| Field Summary | |
|---|---|
static MediaTypeEnum |
CSV
Media type CSV = 1. |
static MediaTypeEnum |
EXCEL
media type EXCEL = 2. |
static MediaTypeEnum |
HTML
media type HTML = 0. |
static MediaTypeEnum |
XML
media type XML = 3. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
Only a single instance of a specific MediaTypeEnum can be created, so we can check using ==. |
static MediaTypeEnum |
fromCode(int key)
lookup a media type by key. |
static MediaTypeEnum |
fromCode(java.lang.Integer key)
lookup a media type by an Integer key. |
static MediaTypeEnum |
fromIntegerCode(java.lang.Integer key)
Deprecated. use fromCode(Integer) |
static MediaTypeEnum |
fromName(java.lang.String code)
Lookup a media type by a String key. |
int |
getCode()
returns the int code. |
java.lang.String |
getName()
returns the description. |
static int |
getSize()
Returns the number of media type currently loaded. |
int |
hashCode()
|
static java.util.Iterator |
iterator()
returns an iterator on all the media type. |
static MediaTypeEnum |
registerMediaType(java.lang.String name)
Register a new MediaType. |
java.lang.String |
toString()
returns the media type description. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final MediaTypeEnum HTML
public static final MediaTypeEnum CSV
public static final MediaTypeEnum EXCEL
public static final MediaTypeEnum XML
| Method Detail |
|---|
public int getCode()
public java.lang.String getName()
public static MediaTypeEnum fromCode(int key)
key - int code
public static MediaTypeEnum fromCode(java.lang.Integer key)
key - Integer code - null safe: a null key returns a null Enum
public static MediaTypeEnum fromIntegerCode(java.lang.Integer key)
key - Integer code - null safe: a null key returns a null Enum
public static MediaTypeEnum fromName(java.lang.String code)
code - String code - null safe: a null key returns a null Enum
public static java.util.Iterator iterator()
public static MediaTypeEnum registerMediaType(java.lang.String name)
name is already assigned the existing instance is returned, otherwise
a new instance is created.
name - media name
public static int getSize()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public boolean equals(java.lang.Object o)
equals in class java.lang.Objecto - the object to compare to
public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||