Java Doc for MapAccessor.java in  » Workflow-Engines » spring-webflow-1.0.4 » org » springframework » binding » collection » 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 » Workflow Engines » spring webflow 1.0.4 » org.springframework.binding.collection 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.springframework.binding.collection.MapAccessor

MapAccessor
public class MapAccessor implements MapAdaptable(Code)
A simple, generic decorator for getting attributes out of a map. May be instantiated directly or used as a base class as a convenience.
author:
   Keith Donald



Constructor Summary
public  MapAccessor(Map map)
     Creates a new attribute map accessor.

Method Summary
public  MapasMap()
    
public  voidassertContainsKey(Object key)
     Asserts that the attribute is present in the attribute map.
public  ObjectassertKeyValueInstanceOf(Object key, Object value, Class requiredType)
     Assert that the key value is an instance of the required type.
public  ObjectassertKeyValueOfType(Object key, Class requiredType)
     Assert that value of the mak key is of the required type.
public  booleancontainsKey(Object key, Class requiredType)
     Indicates if the attribute is present in the attribute map and of the required type.
public  Objectget(Object key, Object defaultValue)
     Returns a value in the map, returning the defaultValue if no value was found.
public  Objectget(Object key, Class requiredType)
     Returns a value in the map, asserting it is of the required type if present and returning null if not found.
public  Objectget(Object key, Class requiredType, Object defaultValue)
     Returns a value in the map of the specified type, returning the defaultValue if no value is found.
public  Object[]getArray(Object key, Class requiredType)
     Returns a array value in the map, asserting it is of the required type if present and returning null if not found.
public  BooleangetBoolean(Object key)
     Returns a boolean value in the map, returning null if no value was found.
public  BooleangetBoolean(Object key, Boolean defaultValue)
     Returns a boolean value in the map, returning the defaultValue if no value was found.
public  CollectiongetCollection(Object key)
     Returns a collection value in the map, returning null if no value was found.
public  CollectiongetCollection(Object key, Class requiredType)
     Returns a collection value in the map, asserting it is of the required type if present and returning null if not found.
public  IntegergetInteger(Object key)
     Returns an integer value in the map, returning null if no value was found.
public  IntegergetInteger(Object key, Integer defaultValue)
     Returns an integer value in the map, returning the defaultValue if no value was found.
public  LonggetLong(Object key)
     Returns a long value in the map, returning null if no value was found.
public  LonggetLong(Object key, Long defaultValue)
     Returns a long value in the map, returning the defaultValue if no value was found.
public  NumbergetNumber(Object key, Class requiredType)
     Returns a number value in the map that is of the specified type, returning null if no value was found.
public  NumbergetNumber(Object key, Class requiredType, Number defaultValue)
     Returns a number attribute value in the map of the specified type, returning the defaultValue if no value was found.
public  ObjectgetRequired(Object key)
     Returns a value in the map, throwing an exception if the attribute is not present and of the correct type.
public  ObjectgetRequired(Object key, Class requiredType)
     Returns an value in the map, asserting it is present and of the required type.
public  Object[]getRequiredArray(Object key, Class requiredType)
     Returns an array value in the map, asserting it is of the required type if present and throwing an exception if not found.
public  BooleangetRequiredBoolean(Object key)
     Returns a boolean value in the map, throwing an exception if the value is not present and of the correct type.
public  CollectiongetRequiredCollection(Object key)
     Returns a collection value in the map, throwing an exception if not found.
public  CollectiongetRequiredCollection(Object key, Class requiredType)
     Returns a collection value in the map, asserting it is of the required type if present and throwing an exception if not found.
public  IntegergetRequiredInteger(Object key)
     Returns an integer value in the map, throwing an exception if the value is not present and of the correct type.
public  LonggetRequiredLong(Object key)
     Returns a long value in the map, throwing an exception if the value is not present and of the correct type.
public  NumbergetRequiredNumber(Object key, Class requiredType)
     Returns a number value in the map, throwing an exception if the attribute is not present and of the correct type.
public  StringgetRequiredString(Object key)
     Returns a string value in the map, throwing an exception if the attribute is not present and of the correct type.
public  StringgetString(Object key)
     Returns a string value in the map, returning null if no value was found.
public  StringgetString(Object key, String defaultValue)
     Returns a string value in the map, returning the defaultValue if no value was found.


Constructor Detail
MapAccessor
public MapAccessor(Map map)(Code)
Creates a new attribute map accessor.
Parameters:
  map - the map




Method Detail
asMap
public Map asMap()(Code)



assertContainsKey
public void assertContainsKey(Object key) throws IllegalArgumentException(Code)
Asserts that the attribute is present in the attribute map.
Parameters:
  key - the key
throws:
  IllegalArgumentException - if the key is not present



assertKeyValueInstanceOf
public Object assertKeyValueInstanceOf(Object key, Object value, Class requiredType)(Code)
Assert that the key value is an instance of the required type.
Parameters:
  key - the key
Parameters:
  value - the value
Parameters:
  requiredType - the required type the value



assertKeyValueOfType
public Object assertKeyValueOfType(Object key, Class requiredType)(Code)
Assert that value of the mak key is of the required type.
Parameters:
  key - the attribute name
Parameters:
  requiredType - the required attribute value type the attribute value



containsKey
public boolean containsKey(Object key, Class requiredType) throws IllegalArgumentException(Code)
Indicates if the attribute is present in the attribute map and of the required type.
Parameters:
  key - the attribute name true if present and of the required type, false if not present.



get
public Object get(Object key, Object defaultValue)(Code)
Returns a value in the map, returning the defaultValue if no value was found.
Parameters:
  key - the key
Parameters:
  defaultValue - the default the attribute value



get
public Object get(Object key, Class requiredType) throws IllegalArgumentException(Code)
Returns a value in the map, asserting it is of the required type if present and returning null if not found.
Parameters:
  key - the key
Parameters:
  requiredType - the required type the value
throws:
  IllegalArgumentException - if the key is present but the value isnot of the required type



get
public Object get(Object key, Class requiredType, Object defaultValue)(Code)
Returns a value in the map of the specified type, returning the defaultValue if no value is found.
Parameters:
  key - the key
Parameters:
  requiredType - the required type
Parameters:
  defaultValue - the default the attribute value
throws:
  IllegalArgumentException - if the key is present but the value isnot of the required type



getArray
public Object[] getArray(Object key, Class requiredType) throws IllegalArgumentException(Code)
Returns a array value in the map, asserting it is of the required type if present and returning null if not found.
Parameters:
  key - the key the array value
throws:
  IllegalArgumentException - if the key is present but the value isnot an array of the required type



getBoolean
public Boolean getBoolean(Object key) throws IllegalArgumentException(Code)
Returns a boolean value in the map, returning null if no value was found.
Parameters:
  key - the key the boolean value
throws:
  IllegalArgumentException - if the key is present but the value isnot a boolean



getBoolean
public Boolean getBoolean(Object key, Boolean defaultValue) throws IllegalArgumentException(Code)
Returns a boolean value in the map, returning the defaultValue if no value was found.
Parameters:
  key - the key
Parameters:
  defaultValue - the default the boolean value
throws:
  IllegalArgumentException - if the key is present but the value isnot a boolean



getCollection
public Collection getCollection(Object key) throws IllegalArgumentException(Code)
Returns a collection value in the map, returning null if no value was found.
Parameters:
  key - the key the collection value
throws:
  IllegalArgumentException - if the key is present but the value isnot a collection



getCollection
public Collection getCollection(Object key, Class requiredType) throws IllegalArgumentException(Code)
Returns a collection value in the map, asserting it is of the required type if present and returning null if not found.
Parameters:
  key - the key the collection value
throws:
  IllegalArgumentException - if the key is present but the value isnot a collection



getInteger
public Integer getInteger(Object key) throws IllegalArgumentException(Code)
Returns an integer value in the map, returning null if no value was found.
Parameters:
  key - the key the integer value
throws:
  IllegalArgumentException - if the key is present but the value isnot an integer



getInteger
public Integer getInteger(Object key, Integer defaultValue) throws IllegalArgumentException(Code)
Returns an integer value in the map, returning the defaultValue if no value was found.
Parameters:
  key - the key
Parameters:
  defaultValue - the default the integer value
throws:
  IllegalArgumentException - if the key is present but the value isnot an integer



getLong
public Long getLong(Object key) throws IllegalArgumentException(Code)
Returns a long value in the map, returning null if no value was found.
Parameters:
  key - the key the long value
throws:
  IllegalArgumentException - if the key is present but not a long



getLong
public Long getLong(Object key, Long defaultValue) throws IllegalArgumentException(Code)
Returns a long value in the map, returning the defaultValue if no value was found.
Parameters:
  key - the key
Parameters:
  defaultValue - the default the long attribute value
throws:
  IllegalArgumentException - if the key is present but the value isnot a long



getNumber
public Number getNumber(Object key, Class requiredType) throws IllegalArgumentException(Code)
Returns a number value in the map that is of the specified type, returning null if no value was found.
Parameters:
  key - the key
Parameters:
  requiredType - the required number type the numbervalue
throws:
  IllegalArgumentException - if the key is present but the value isnot a number of the required type



getNumber
public Number getNumber(Object key, Class requiredType, Number defaultValue) throws IllegalArgumentException(Code)
Returns a number attribute value in the map of the specified type, returning the defaultValue if no value was found.
Parameters:
  key - the attribute name the number value
Parameters:
  defaultValue - the default
throws:
  IllegalArgumentException - if the key is present but the value isnot a number of the required type



getRequired
public Object getRequired(Object key) throws IllegalArgumentException(Code)
Returns a value in the map, throwing an exception if the attribute is not present and of the correct type.
Parameters:
  key - the key the value



getRequired
public Object getRequired(Object key, Class requiredType) throws IllegalArgumentException(Code)
Returns an value in the map, asserting it is present and of the required type.
Parameters:
  key - the key
Parameters:
  requiredType - the required type the value



getRequiredArray
public Object[] getRequiredArray(Object key, Class requiredType) throws IllegalArgumentException(Code)
Returns an array value in the map, asserting it is of the required type if present and throwing an exception if not found.
Parameters:
  key - the key the array value
throws:
  IllegalArgumentException - if the key is not present or present butthe value is not a array of the required type



getRequiredBoolean
public Boolean getRequiredBoolean(Object key) throws IllegalArgumentException(Code)
Returns a boolean value in the map, throwing an exception if the value is not present and of the correct type.
Parameters:
  key - the attribute the boolean value
throws:
  IllegalArgumentException - if the key is not present or present butthe value is not a boolean



getRequiredCollection
public Collection getRequiredCollection(Object key) throws IllegalArgumentException(Code)
Returns a collection value in the map, throwing an exception if not found.
Parameters:
  key - the key the collection value
throws:
  IllegalArgumentException - if the key is not present or present butthe value is not a collection



getRequiredCollection
public Collection getRequiredCollection(Object key, Class requiredType) throws IllegalArgumentException(Code)
Returns a collection value in the map, asserting it is of the required type if present and throwing an exception if not found.
Parameters:
  key - the key the collection value
throws:
  IllegalArgumentException - if the key is not present or present butthe value is not a collection of the required type



getRequiredInteger
public Integer getRequiredInteger(Object key) throws IllegalArgumentException(Code)
Returns an integer value in the map, throwing an exception if the value is not present and of the correct type.
Parameters:
  key - the attribute name the integer attribute value
throws:
  IllegalArgumentException - if the key is not present or present butthe value is not an integer



getRequiredLong
public Long getRequiredLong(Object key) throws IllegalArgumentException(Code)
Returns a long value in the map, throwing an exception if the value is not present and of the correct type.
Parameters:
  key - the key the long attribute value
throws:
  IllegalArgumentException - if the key is not present or present butthe value is not a long



getRequiredNumber
public Number getRequiredNumber(Object key, Class requiredType) throws IllegalArgumentException(Code)
Returns a number value in the map, throwing an exception if the attribute is not present and of the correct type.
Parameters:
  key - the key the number value
throws:
  IllegalArgumentException - if the key is not present or present butthe value is not a number of the required type



getRequiredString
public String getRequiredString(Object key) throws IllegalArgumentException(Code)
Returns a string value in the map, throwing an exception if the attribute is not present and of the correct type.
Parameters:
  key - the key the string value
throws:
  IllegalArgumentException - if the key is not present or present butthe value is not a string



getString
public String getString(Object key) throws IllegalArgumentException(Code)
Returns a string value in the map, returning null if no value was found.
Parameters:
  key - the key the string value
throws:
  IllegalArgumentException - if the key is present but the value isnot a string



getString
public String getString(Object key, String defaultValue) throws IllegalArgumentException(Code)
Returns a string value in the map, returning the defaultValue if no value was found.
Parameters:
  key - the key
Parameters:
  defaultValue - the default the string value
throws:
  IllegalArgumentException - if the key is present but the value isnot a string



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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