Orbital library

orbital.util
Class DelegateMap

java.lang.Object
  extended by orbital.util.DelegateMap
All Implemented Interfaces:
java.io.Serializable, java.util.Map
Direct Known Subclasses:
InterpretationBase

public class DelegateMap
extends java.lang.Object
implements java.util.Map, java.io.Serializable

A DelegateMap that works as a delegator to maps. It implements the java.util.Map interface itself, and so a DelegateMap is a Map delegating to a specified implementation Map.

Author:
André Platzer
See Also:
Serialized Form
Structure:
delegate delegatee:java.util.Map, implements java.util.Map, implements java.io.Serializable

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
java.util.Map.Entry
 
Constructor Summary
protected DelegateMap(java.util.Map delegatee)
          Extend to create a map delegating to an implementation map.
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object v)
           
 java.util.Set entrySet()
           
 boolean equals(java.lang.Object o)
           
 java.lang.Object get(java.lang.Object key)
           
protected  java.util.Map getDelegatee()
          Get the delegatee map to which operations are delegated.
 int hashCode()
           
 boolean isEmpty()
           
 java.util.Set keySet()
           
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
           
 void putAll(java.util.Map t)
           
 java.lang.Object remove(java.lang.Object key)
           
protected  void setDelegatee(java.util.Map delegatee)
          Set the delegatee map to which operations are delegated.
 int size()
           
 java.util.Collection values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegateMap

protected DelegateMap(java.util.Map delegatee)
Extend to create a map delegating to an implementation map.

Parameters:
delegatee - the implementation-map to that map operations are delegated.
Method Detail

getDelegatee

protected java.util.Map getDelegatee()
Get the delegatee map to which operations are delegated.

Returns:
the implementation-map that map operations are delegated to.

setDelegatee

protected void setDelegatee(java.util.Map delegatee)
Set the delegatee map to which operations are delegated.

Parameters:
delegatee - the implementation-map that map operations are delegated to.

size

public int size()
Specified by:
size in interface java.util.Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object key)
Specified by:
containsKey in interface java.util.Map

containsValue

public boolean containsValue(java.lang.Object v)
Specified by:
containsValue in interface java.util.Map

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Specified by:
put in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object key)
Specified by:
remove in interface java.util.Map

putAll

public void putAll(java.util.Map t)
Specified by:
putAll in interface java.util.Map

clear

public void clear()
Specified by:
clear in interface java.util.Map

keySet

public java.util.Set keySet()
Specified by:
keySet in interface java.util.Map

values

public java.util.Collection values()
Specified by:
values in interface java.util.Map

entrySet

public java.util.Set entrySet()
Specified by:
entrySet in interface java.util.Map

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface java.util.Map
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Specified by:
hashCode in interface java.util.Map
Overrides:
hashCode in class java.lang.Object

Orbital library
1.3.0: 11 Apr 2009

Copyright © 1996-2009 André Platzer
All Rights Reserved.