|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.portal.common.util.AbstractTypedMap.Converter<E,I>
public abstract static class AbstractTypedMap.Converter<E,I>
Defines a converter that converts an internal value to an external value and vice versa. Null values will not passed as arguments to the methods and if a conversion method returns a null value it will be considered as a conversion failure although the implementations should not rely and this behavior and rather rely on a adapted exception.
| Constructor Summary | |
|---|---|
AbstractTypedMap.Converter()
|
|
| Method Summary | ||
|---|---|---|
protected abstract boolean |
equals(I left,
I right)
Compare internal values, the passed argument are never null so the method does not need to check nullity of the arguments. |
|
protected abstract E |
getExternal(I internal)
Converts the internal value into its external representation. |
|
protected abstract I |
getInternal(E external)
Converts the external value to the its internal representation that will be stored in the map. |
|
static
|
identityConverter()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractTypedMap.Converter()
| Method Detail |
|---|
public static <T> AbstractTypedMap.Converter<T,T> identityConverter()
protected abstract I getInternal(E external)
throws java.lang.IllegalArgumentException,
java.lang.ClassCastException
external - the external value
java.lang.ClassCastException - if the class of the specified argument prevents it from being converter
java.lang.IllegalArgumentException - if some aspect of this argument prevents it from being converted
protected abstract E getExternal(I internal)
throws java.lang.IllegalArgumentException,
java.lang.ClassCastException
internal - the internal value
java.lang.ClassCastException - if the class of the specified argument prevents it from being converter
java.lang.IllegalArgumentException - if some aspect of this argument prevents it from being converted
protected abstract boolean equals(I left,
I right)
left - the left valueright - the right value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||