org.apache.commons.functor.example.map
Class FunctoredMap

java.lang.Object
  extended by org.apache.commons.functor.example.map.FunctoredMap
All Implemented Interfaces:
Map
Direct Known Subclasses:
FixedSizeMap, LazyMap, PredicatedMap

public class FunctoredMap
extends Object
implements Map

Version:
$Revision: 666157 $ $Date: 2008-06-10 17:34:23 +0200 (Tue, 10 Jun 2008) $
Author:
Rodney Waldhoff

Nested Class Summary
protected static class FunctoredMap.ContainsKey
           
protected static class FunctoredMap.Throw
           
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
protected static UnaryProcedure DEFAULT_ON_CLEAR
           
protected static BinaryFunction DEFAULT_ON_GET
           
protected static BinaryFunction DEFAULT_ON_PUT
           
protected static BinaryProcedure DEFAULT_ON_PUT_ALL
           
protected static BinaryFunction DEFAULT_ON_REMOVE
           
 
Constructor Summary
FunctoredMap(Map map)
           
 
Method Summary
 void clear()
           
 boolean containsKey(Object key)
           
 boolean containsValue(Object value)
           
 Set entrySet()
           
 boolean equals(Object obj)
           
 Object get(Object key)
           
 int hashCode()
           
 boolean isEmpty()
           
 Set keySet()
           
 Object put(Object key, Object value)
           
 void putAll(Map src)
           
 Object remove(Object key)
           
protected  void setOnClear(UnaryProcedure procedure)
           
protected  void setOnGet(BinaryFunction function)
           
protected  void setOnPut(BinaryFunction function)
           
protected  void setOnPutAll(BinaryProcedure procedure)
           
protected  void setOnRemove(BinaryFunction function)
           
 int size()
           
 String toString()
           
 Collection values()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_ON_PUT

protected static final BinaryFunction DEFAULT_ON_PUT

DEFAULT_ON_GET

protected static final BinaryFunction DEFAULT_ON_GET

DEFAULT_ON_PUT_ALL

protected static final BinaryProcedure DEFAULT_ON_PUT_ALL

DEFAULT_ON_REMOVE

protected static final BinaryFunction DEFAULT_ON_REMOVE

DEFAULT_ON_CLEAR

protected static final UnaryProcedure DEFAULT_ON_CLEAR
Constructor Detail

FunctoredMap

public FunctoredMap(Map map)
Method Detail

hashCode

public int hashCode()
Specified by:
hashCode in interface Map
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

values

public Collection values()
Specified by:
values in interface Map

keySet

public Set keySet()
Specified by:
keySet in interface Map

get

public Object get(Object key)
Specified by:
get in interface Map

clear

public void clear()
Specified by:
clear in interface Map

size

public int size()
Specified by:
size in interface Map

put

public Object put(Object key,
                  Object value)
Specified by:
put in interface Map

putAll

public void putAll(Map src)
Specified by:
putAll in interface Map

entrySet

public Set entrySet()
Specified by:
entrySet in interface Map

containsKey

public boolean containsKey(Object key)
Specified by:
containsKey in interface Map

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Map

remove

public Object remove(Object key)
Specified by:
remove in interface Map

equals

public boolean equals(Object obj)
Specified by:
equals in interface Map
Overrides:
equals in class Object

containsValue

public boolean containsValue(Object value)
Specified by:
containsValue in interface Map

setOnClear

protected void setOnClear(UnaryProcedure procedure)

setOnPut

protected void setOnPut(BinaryFunction function)

setOnGet

protected void setOnGet(BinaryFunction function)

setOnPutAll

protected void setOnPutAll(BinaryProcedure procedure)

setOnRemove

protected void setOnRemove(BinaryFunction function)


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.