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.apache.tiles.context
Class MapEntry<K,V>

    java.lang.Object
      org.apache.tiles.context.MapEntry<K,V>

Type Parameters:
  `K` - The key type.
  `V` - The value type.

All Implemented Interfaces:
  java.util.Map.Entry<K,V>

    public class MapEntry<K,V>

extends java.lang.Object
implements java.util.Map.Entry<K,V>

Map.Entry implementation that can be constructed to either be read-only or not.

Version:
  $Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200 (mer, 11 apr 2007) $

Constructor Summary
`MapEntry(K key, V value, boolean modifiable)` Creates a map entry that can either allow modifications or not.

Method Summary
`boolean` | `equals(java.lang.Object o)` Determines if this entry is equal to the passed object.
`K` | `getKey()` Gets the entry key.
`V` | `getValue()` Gets the entry value.
`int` | `hashCode()` Returns the hashcode for this entry.
`V` | `setValue(V val)` Sets the entry value if the entry can be modified.

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

Constructor Detail

### MapEntry

    public MapEntry(K key,
                    V value,
                    boolean modifiable)

  Creates a map entry that can either allow modifications or not.

  Parameters:
    `key` - The entry key
    `value` - The entry value
    `modifiable` - Whether the entry should allow modification or not

Method Detail

### getKey

    public K getKey()

  Gets the entry key.

  Specified by:
    `getKey` in interface `java.util.Map.Entry<K,V>`
  Returns:
    The entry key

### getValue

    public V getValue()

  Gets the entry value.

  Specified by:
    `getValue` in interface `java.util.Map.Entry<K,V>`
  Returns:
    The entry key

### setValue

    public V setValue(V val)

  Sets the entry value if the entry can be modified.

  Specified by:
    `setValue` in interface `java.util.Map.Entry<K,V>`
  Parameters:
    `val` - The new value
  Returns:
    The old entry value
  Throws:
    `java.lang.UnsupportedOperationException` - If the entry cannot be modified

### equals

    public boolean equals(java.lang.Object o)

  Determines if this entry is equal to the passed object.

  Specified by:
    `equals` in interface `java.util.Map.Entry<K,V>`
  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `o` - The object to test
  Returns:
    True if equal, else false

### hashCode

    public int hashCode()

  Returns the hashcode for this entry.

  Specified by:
    `hashCode` in interface `java.util.Map.Entry<K,V>`
  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    The and'ed hashcode of the key and value

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 © 2001-2010 Apache Software Foundation. All Rights Reserved.