org.edg.security.authorization.map
Class RegexMap

java.lang.Object
  |
  +--org.edg.security.authorization.map.RegexMap
All Implemented Interfaces:
java.util.Map

public class RegexMap
extends java.lang.Object
implements java.util.Map

Class RegexMap. A map that interprets an underlying map's key set as a list of regexps. NOTE: This is a minimal implementation: Currently, all you can call are the get() and entrySet() methods. NOTE:: The JDK 1.4 Regex stuff is used here: NOT the Perl packages!

Version:
%I%, %G%
Author:
Olle Mulmo

Field Summary
protected  java.util.Map myMap
           
protected static org.apache.log4j.Logger theLogger
           
 
Constructor Summary
RegexMap(java.util.Map map)
           
 
Method Summary
 void clear()
           
 boolean containsKey(java.lang.Object key)
           
 boolean containsValue(java.lang.Object value)
           
 java.util.Set entrySet()
           
 java.lang.Object get(java.lang.Object key)
           
 boolean isEmpty()
           
 java.util.Set keySet()
          Deprecated. What does this mean? The regex key set or all possible keys that matches those regexes? Unsupported for now...
 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)
           
 int size()
           
 java.lang.String toString()
           
 java.util.Collection values()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

theLogger

protected static org.apache.log4j.Logger theLogger

myMap

protected java.util.Map myMap
Constructor Detail

RegexMap

public RegexMap(java.util.Map map)
Parameters:
map - the map containing regular expressions in its key set
Method Detail

size

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

isEmpty

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

containsKey

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

containsValue

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

get

public java.lang.Object get(java.lang.Object key)
Specified by:
get in interface java.util.Map
Returns:
a List of the combined value results of all matching regular expressions
See Also:
Map.get(Object)

put

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

remove

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

putAll

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

clear

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

keySet

public java.util.Set keySet()
Deprecated. What does this mean? The regex key set or all possible keys that matches those regexes? Unsupported for now...

Specified by:
keySet in interface java.util.Map
See Also:
Map.keySet()

values

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

entrySet

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

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object