Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.common.util
Class AbstractTypedMap<EK,EV,IK,IV>

    java.lang.Object
      org.jboss.portal.common.util.AbstractTypedMap<EK,EV,IK,IV>

All Implemented Interfaces:
  java.util.Map<EK,EV>

Direct Known Subclasses:
  ParameterMap, TypedMap

    public abstract class AbstractTypedMap<EK,EV,IK,IV>

extends java.lang.Object
implements java.util.Map<EK,EV>

A map implementations that use a conversion mechanism to provide a type mapping between the external types declared by the map and the internal representations backed by the internal map.

Version:
  $Revision: 1.1 $
Author:
  Julien Viet

Nested Class Summary
`static class` | `AbstractTypedMap.Converter<E,I>` Defines a converter that converts an internal value to an external value and vice versa.

Nested classes/interfaces inherited from interface java.util.Map
`java.util.Map.Entry<K,V>`

Constructor Summary
`AbstractTypedMap()`

Method Summary
`void` | `clear()`
`boolean` | `containsKey(java.lang.Object key)`
`boolean` | `containsValue(java.lang.Object value)`
`protected java.util.Map<IK,IV>` | `convert(java.util.Map<? extends EK,? extends EV> t)` Validates and unwraps the map.
`java.util.Set<java.util.Map.Entry<EK,EV>>` | `entrySet()`
`boolean` | `equals(java.lang.Object o)` Compare to parameters objects.
`EV` | `get(java.lang.Object key)`
`protected abstract java.util.Map<IK,IV>` | `getDelegate()`
`abstract AbstractTypedMap.Converter<EK,IK>` | `getKeyConverter()`
`abstract AbstractTypedMap.Converter<EV,IV>` | `getValueConverter()`
`boolean` | `isEmpty()`
`java.util.Set<EK>` | `keySet()`
`EV` | `put(EK ek, EV ev)`
`void` | `putAll(java.util.Map<? extends EK,? extends EV> em)`
`EV` | `remove(java.lang.Object key)`
`void` | `replace(java.util.Map<EK,EV> map)` Replace the content with the new map which is validated before replacement.
`int` | `size()`
`java.lang.String` | `toString()`
`void` | `validate()` Validate the content.
`java.util.Collection<EV>` | `values()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface java.util.Map
`hashCode`

Constructor Detail

### AbstractTypedMap

    public AbstractTypedMap()

Method Detail

### getKeyConverter

    public abstract AbstractTypedMap.Converter<EK,IK> getKeyConverter()

### getValueConverter

    public abstract AbstractTypedMap.Converter<EV,IV> getValueConverter()

### getDelegate

    protected abstract java.util.Map<IK,IV> getDelegate()

### size

    public final int size()

  Specified by:
    `size` in interface `java.util.Map<EK,EV>`

### clear

    public final void clear()

  Specified by:
    `clear` in interface `java.util.Map<EK,EV>`

### isEmpty

    public final boolean isEmpty()

  Specified by:
    `isEmpty` in interface `java.util.Map<EK,EV>`

### containsKey

    public final boolean containsKey(java.lang.Object key)

  Specified by:
    `containsKey` in interface `java.util.Map<EK,EV>`

### keySet

    public final java.util.Set<EK> keySet()

  Specified by:
    `keySet` in interface `java.util.Map<EK,EV>`

### put

    public final EV put(EK ek,
                        EV ev)

  Specified by:
    `put` in interface `java.util.Map<EK,EV>`

### get

    public final EV get(java.lang.Object key)

  Specified by:
    `get` in interface `java.util.Map<EK,EV>`

### remove

    public final EV remove(java.lang.Object key)

  Specified by:
    `remove` in interface `java.util.Map<EK,EV>`

### containsValue

    public final boolean containsValue(java.lang.Object value)

  Specified by:
    `containsValue` in interface `java.util.Map<EK,EV>`

### entrySet

    public final java.util.Set<java.util.Map.Entry<EK,EV>> entrySet()

  Specified by:
    `entrySet` in interface `java.util.Map<EK,EV>`

### putAll

    public final void putAll(java.util.Map<? extends EK,? extends EV> em)

  Specified by:
    `putAll` in interface `java.util.Map<EK,EV>`

### values

    public final java.util.Collection<EV> values()

  Specified by:
    `values` in interface `java.util.Map<EK,EV>`

### equals

    public final boolean equals(java.lang.Object o)

  Compare to parameters objects.

  Specified by:
    `equals` in interface `java.util.Map<EK,EV>`
  Overrides:
    `equals` in class `java.lang.Object`

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### convert

    protected final java.util.Map<IK,IV> convert(java.util.Map<? extends EK,? extends EV> t)
                                          throws java.lang.IllegalArgumentException,
                                                 java.lang.NullPointerException,
                                                 java.lang.ClassCastException

  Validates and unwraps the map.

  Throws:
    `java.lang.IllegalArgumentException`
    `java.lang.NullPointerException`
    `java.lang.ClassCastException`

### replace

    public final void replace(java.util.Map<EK,EV> map)
                       throws java.lang.ClassCastException,
                              java.lang.NullPointerException,
                              java.lang.IllegalArgumentException

  Replace the content with the new map which is validated before replacement.

  Throws:
    `java.lang.ClassCastException`
    `java.lang.NullPointerException`
    `java.lang.IllegalArgumentException`

### validate

    public final void validate()
                        throws java.lang.ClassCastException,
                               java.lang.NullPointerException,
                               java.lang.IllegalArgumentException

  Validate the content.

  Throws:
    `java.lang.ClassCastException`
    `java.lang.NullPointerException`
    `java.lang.IllegalArgumentException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008. All Rights Reserved.