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 ParameterMap

    java.lang.Object
      org.jboss.portal.common.util.TypedMap<java.lang.String,java.lang.String[],java.lang.String,java.lang.String[]>
          org.jboss.portal.common.util.ParameterMap

All Implemented Interfaces:
  java.util.Map<java.lang.String,java.lang.String[]>

Direct Known Subclasses:
  PortletParameters

    public class ParameterMap

extends TypedMap<java.lang.String,java.lang.String[],java.lang.String,java.lang.String[]>

A decorator that enforce the map content to be

Version:
  $Revision: 6671 $
Author:
  Julien Viet

Nested Class Summary

Nested classes/interfaces inherited from class org.jboss.portal.common.util.TypedMap
`TypedMap.Converter<E,I>, TypedMap.KeySet, TypedMap.TypedEntrySet, TypedMap.ValueCollection`

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

Constructor Summary
`ParameterMap()`
`ParameterMap(boolean cloneInternalValue, boolean cloneExternalValue)`
`ParameterMap(java.util.Map<java.lang.String,java.lang.String[]> delegate)`
`ParameterMap(java.util.Map<java.lang.String,java.lang.String[]> delegate, boolean cloneInternalValue, boolean cloneExternalValue)`
`ParameterMap(MapAccessor<java.lang.String,java.lang.String[]> accessor)`
`ParameterMap(MapAccessor<java.lang.String,java.lang.String[]> accessor, boolean cloneInternalValue, boolean cloneExternalValue)`

Method Summary
`java.lang.String` | `getValue(java.lang.String name)` Return the parameter value or null if it does not exist.
`java.lang.String[]` | `getValues(java.lang.String name)` Return the parameter values or null if it does not exist.
`boolean` | `isCloneExternalValue()`
`boolean` | `isCloneInternalValue()` Return true if values returned by the map are cloned.
`void` | `setValue(java.lang.String name, java.lang.String value)` Set the a parameter value.
`void` | `setValues(java.lang.String name, java.lang.String[] values)` Set the parameter values.

Methods inherited from class org.jboss.portal.common.util.TypedMap
`clear, containsKey, containsValue, convert, entrySet, equals, get, getKeyConverter, getValueConverter, isEmpty, keySet, put, putAll, remove, replace, size, toString, validate, 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

### ParameterMap

    public ParameterMap(boolean cloneInternalValue,
                        boolean cloneExternalValue)

### ParameterMap

    public ParameterMap(MapAccessor<java.lang.String,java.lang.String[]> accessor)

### ParameterMap

    public ParameterMap(java.util.Map<java.lang.String,java.lang.String[]> delegate)

### ParameterMap

    public ParameterMap()

### ParameterMap

    public ParameterMap(MapAccessor<java.lang.String,java.lang.String[]> accessor,
                        boolean cloneInternalValue,
                        boolean cloneExternalValue)

### ParameterMap

    public ParameterMap(java.util.Map<java.lang.String,java.lang.String[]> delegate,
                        boolean cloneInternalValue,
                        boolean cloneExternalValue)

Method Detail

### isCloneInternalValue

    public boolean isCloneInternalValue()

  Return true if values returned by the map are cloned.

  Returns:
    true if returned values are cloned

### isCloneExternalValue

    public boolean isCloneExternalValue()

### getValue

    public java.lang.String getValue(java.lang.String name)
                              throws java.lang.IllegalArgumentException

  Return the parameter value or null if it does not exist.

  Parameters:
    `name` - the parameter name
  Returns:
    the parameter value or null if it does not exist
  Throws:
    `java.lang.NullPointerException` - if the name is null
    `java.lang.IllegalArgumentException`

### getValues

    public java.lang.String[] getValues(java.lang.String name)
                                 throws java.lang.IllegalArgumentException

  Return the parameter values or null if it does not exist.

  Parameters:
    `name` - the value to get
  Returns:
    the parameter values
  Throws:
    `java.lang.NullPointerException` - if the name is null
    `java.lang.IllegalArgumentException`

### setValue

    public void setValue(java.lang.String name,
                         java.lang.String value)

  Set the a parameter value.

  Parameters:
    `name` - the parameter name
    `value` - the parameter value
  Throws:
    `java.lang.NullPointerException` - if the name or the value is null

### setValues

    public void setValues(java.lang.String name,
                          java.lang.String[] values)
                   throws java.lang.NullPointerException,
                          java.lang.IllegalArgumentException

  Set the parameter values. This method does not make a defensive copy of the values.

  Parameters:
    `name` - the parameter name
    `values` - the parameter values
  Throws:
    `java.lang.NullPointerException` - if the name or the value is null
    `java.lang.IllegalArgumentException` - if the values length is zero or contains a null element

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