Java Doc for WildcardMap.java in  » Collaboration » JacORB » org » jacorb » notification » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Collaboration » JacORB » org.jacorb.notification.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.jacorb.notification.util.WildcardMap

All known Subclasses:   org.jacorb.notification.util.WeakCacheWildcardMap,  org.jacorb.notification.util.DefaultWildcardMap,  org.jacorb.notification.util.CachingWildcardMap,
WildcardMap
public interface WildcardMap (Code)
An Object that maps String Keys to Values.
A WildcardMap cannot contain duplicate keys. Each Key has exactly one Entry associated. A Key can contain the Wildcard Character '*' which matches zero or more characters. The WildcardMap supports two semantics of accessing the entries. The first way is to ignore the special meaning of the Wildcard character and to just return the entries as they were inserted.
This way you could put some entries in a WildcardMap and fetch them again using the Operation WildcardMap.getNoExpansion(Object) getNoExpansion() :
 
 WildcardMap wc = new WildcardMap();
 wc.put("abc", new Integer(1));
 wc.put("a*", new Integer(2));
 wc.getNoExpansion("abc") => 1
 wc.getNoExpansion("a*") => 2
 wc.getNoExpansion("xyz") => null
 
This behaviour is similiar to a java.util.Map Map .
The other way using the WildcardMap is to use the Operation WildcardMap.getWithExpansion(Object)getWithExpansion() . This Operations matches the requested Key to all contained Keys. If the Key of an Entry contains the Wildcard Character '*' it is matched as expected by the semantic of '*'. The Operations returns an array of all matching entries:
 wc.getWithExpansion("abc") => [1,2]
 wc.getWithExpansion("a") => [2]
 wc.getWithExpansion("abcd") => [2]
 wc.getWithExpansion("xyz") => []
 

author:
   Alphonse Bendt
version:
   $Id: WildcardMap.java,v 1.16 2005/08/21 13:38:40 alphonse.bendt Exp $




Method Summary
 voidclear()
    
 ObjectgetNoExpansion(Object key)
     Returns the value to which this map maps the specified key.
 Object[]getWithExpansion(Object key)
     Returns the value to which this map maps the specified key.
 Objectput(Object key, Object value)
     The operation put associates the specified value with the specified key in this map.
 Objectremove(Object key)
     remove the specified key from this Map.



Method Detail
clear
void clear()(Code)
clear this map



getNoExpansion
Object getNoExpansion(Object key)(Code)
Returns the value to which this map maps the specified key. Returns null if the map contains no mapping for this key.
Parameters:
  key - key whose associated value is to be returned the value to which this map maps the specified key, or null if the map contains nomapping for this key.



getWithExpansion
Object[] getWithExpansion(Object key)(Code)
Returns the value to which this map maps the specified key. Additionaly return all Values which keys contain a Wildcard and match the requested key. Returns null if the map contains no mapping for this key.
Parameters:
  key - key whose associated value is to be returned an Array of all Matching entries or null if no matching entry could be found.



put
Object put(Object key, Object value)(Code)
The operation put associates the specified value with the specified key in this map. The String representation of the Key java.lang.Object.toString toString() is used. If the map previously contained a mapping for this key, the old value is replaced by the specified value.
Parameters:
  key - key with which String representation the specified value is to be associated.
Parameters:
  value - value to be associated with the specified key. previous value associated with specified key, or null if there was no mapping forkey.



remove
Object remove(Object key)(Code)
remove the specified key from this Map.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.