|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object magoffin.matt.meta.support.AbstractMetadataResource magoffin.matt.meta.support.AbstractEnumMetadataResource<T>
T
- the enum typepublic abstract class AbstractEnumMetadataResource<T extends java.lang.Enum<T>>
Abstract base MetadataResource
implementation with special
support for an enumeration type.
Field Summary |
---|
Fields inherited from class magoffin.matt.meta.support.AbstractMetadataResource |
---|
log |
Constructor Summary | |
---|---|
AbstractEnumMetadataResource()
|
Method Summary | |
---|---|
protected void |
addError(T type,
java.lang.String msg)
Set an error message for a particular type. |
protected void |
addValue(T type,
java.lang.Object value)
Add a value for a type constant. |
java.lang.Object |
getValue(T type,
java.util.Locale locale)
Get a single metadata value based on a type constant. |
java.lang.Iterable<?> |
getValues(T type,
java.util.Locale locale)
Get all available metadata values based on a type constant. |
protected void |
setValue(T type,
java.lang.Object value)
Set a value for a type constant. |
protected void |
setValues(T type,
java.util.Collection<?> values)
Set a value for a type constant. |
Methods inherited from class magoffin.matt.meta.support.AbstractMetadataResource |
---|
addError, addValue, clearValues, getParsedKeys, getParseErrors, getValue, getValueList, getValues, setValue, setValues |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractEnumMetadataResource()
Method Detail |
---|
public java.lang.Object getValue(T type, java.util.Locale locale)
Enum.name()
will be used to call
AbstractMetadataResource.getValue(String, Locale)
. If more than one
metadata of the specified type is available, this will
return the first available one.
type
- the typelocale
- a Locale
public java.lang.Iterable<?> getValues(T type, java.util.Locale locale)
Enum.name()
will be used to call
AbstractMetadataResource.getValues(String, Locale)
. If more than one
metadata of the specified type is available, this will
return the first available one.
type
- the typelocale
- a Locale
protected final void setValue(T type, java.lang.Object value)
This replaces any values currently associated with the key.
Enum.name()
will be used to call
AbstractMetadataResource.setValue(String, Object)
.
type
- the type to usevalue
- the value to setprotected final void setValues(T type, java.util.Collection<?> values)
This replaces any values currently associated with the key.
Enum.name()
will be used to call
AbstractMetadataResource.setValues(String, Collection)
.
type
- the type to usevalues
- the values to setprotected final void addValue(T type, java.lang.Object value)
This replaces any values currently associated with the key.
Enum.name()
will be used to call
AbstractMetadataResource.addValue(String, Object)
.
type
- the type to usevalue
- the value to addprotected final void addError(T type, java.lang.String msg)
Enum.name()
will be used to call
AbstractMetadataResource.addError(String, String)
.
type
- the type to set the error message formsg
- the error message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |