Overview | Package | Class | 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 TypedMap<EK,EV,IK,IV>

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

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

Direct Known Subclasses:
  AbstractPropertyMap, ParameterMap, PersistentRegistration.Properties

    public class TypedMap<EK,EV,IK,IV>

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

Version:
  $Revision: 1.1 $
Author:
  Julien Viet

Nested Class Summary
`static class` | `TypedMap.Converter<E,I>`
`class` | `TypedMap.KeySet`
`class` | `TypedMap.TypedEntrySet`
`class` | `TypedMap.ValueCollection`

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

Constructor Summary
`TypedMap(java.util.Map<IK,IV> delegate, TypedMap.Converter<EK,IK> keyConv, TypedMap.Converter<EV,IV> valueConv)`
`TypedMap(MapAccessor<IK,IV> accessor, TypedMap.Converter<EK,IK> keyConverter, TypedMap.Converter<EV,IV> valueConverter)`

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)`
`TypedMap.Converter<EK,IK>` | `getKeyConverter()`
`TypedMap.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

### TypedMap

    public TypedMap(MapAccessor<IK,IV> accessor,
                    TypedMap.Converter<EK,IK> keyConverter,
                    TypedMap.Converter<EV,IV> valueConverter)

### TypedMap

    public TypedMap(java.util.Map<IK,IV> delegate,
                    TypedMap.Converter<EK,IK> keyConv,
                    TypedMap.Converter<EV,IV> valueConv)

Method Detail

### getKeyConverter

    public TypedMap.Converter<EK,IK> getKeyConverter()

### getValueConverter

    public TypedMap.Converter<EV,IV> getValueConverter()

### 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 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 void putAll(java.util.Map<? extends EK,? extends EV> em)

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

### values

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

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

### equals

    public 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.

  Parameters:
    `t` -
  Returns:
  Throws:
    `java.lang.IllegalArgumentException`
    `java.lang.NullPointerException`
    `java.lang.ClassCastException`

### replace

    public 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.

  Parameters:
    `map` - the replacement map
  Throws:
    `java.lang.ClassCastException`
    `java.lang.NullPointerException`
    `java.lang.IllegalArgumentException`

### validate

    public 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 | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD