Java Doc for EnumMap.java in  » Apache-Harmony-Java-SE » java-package » java » 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 » Apache Harmony Java SE » java package » java.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.util.EnumMap

EnumMap
public class EnumMap extends AbstractMap implements Serializable,Cloneable(Code)


Field Summary
transient  intenumSize
    
transient  boolean[]hasMapping
    
transient  Enum[]keys
    
transient  Object[]values
    

Constructor Summary
public  EnumMap(Class<K> keyType)
     Constructs an empty EnumMap.
public  EnumMap(EnumMap<K, ? extends V> map)
     Constructs an EnumMap using the same key type and contents as the given EnumMap.
public  EnumMap(Map<K, ? extends V> map)
     Constructs an EnumMap with the same contents as the given Map.

Method Summary
public  voidclear()
     Clears this map.
public  EnumMap<K, V>clone()
     Clones this map to create a shallow copy.
public  booleancontainsKey(Object key)
     Returns true if the given object is present as a key in this map.
public  booleancontainsValue(Object value)
     Returns true if the given object is present as a value in this map.
public  Set<Map.Entry<K, V>>entrySet()
     Returns a Set of Map.Entrys that represent the entries in this EnumMap.
public  booleanequals(Object object)
     Returns true if this EnumMap is equal to the given object.
public  Vget(Object key)
     Returns the value stored in this map for the given key in this map, or null if this map has no entry for that key.
Parameters:
  key - the key to get the value for.
public  Set<K>keySet()
     Returns a Set containing the keys for this EnumMap.
public  Vput(K key, V value)
     Stores a value in this map for the given key.
public  voidputAll(Map<? extends K, ? extends V> map)
    
public  Vremove(Object key)
     Removes the entry for the given key from this map, if there is one.
public  intsize()
    
public  Collection<V>values()
     Returns a Collection containing the values for this EnumMap.

Field Detail
enumSize
transient int enumSize(Code)



hasMapping
transient boolean[] hasMapping(Code)



keys
transient Enum[] keys(Code)



values
transient Object[] values(Code)




Constructor Detail
EnumMap
public EnumMap(Class<K> keyType)(Code)
Constructs an empty EnumMap.
Parameters:
  keyType - the Class that is to be used for the key type for this map
throws:
  NullPointerException - if the keyType is null



EnumMap
public EnumMap(EnumMap<K, ? extends V> map)(Code)
Constructs an EnumMap using the same key type and contents as the given EnumMap.
Parameters:
  map - the EnumMap from which the initial contents of this EnumMapare copied
throws:
  NullPointerException - if the map is null



EnumMap
public EnumMap(Map<K, ? extends V> map)(Code)
Constructs an EnumMap with the same contents as the given Map. If the Map is an EnumMap, this is equivalent to calling EnumMap.EnumMap(EnumMap) }. Otherwise, the given map cannot be empty so that the key type of this EnumMap can be inferred.
Parameters:
  map - the Map from which the initial contents of this EnumMap arecopied
throws:
  IllegalArgumentException - if the map is empty and is not of type EnumMap
throws:
  NullPointerException - if the map is null




Method Detail
clear
public void clear()(Code)
Clears this map.



clone
public EnumMap<K, V> clone()(Code)
Clones this map to create a shallow copy. a shallow copy of this map



containsKey
public boolean containsKey(Object key)(Code)
Returns true if the given object is present as a key in this map.
Parameters:
  key - the key to look for true if this map contains the key



containsValue
public boolean containsValue(Object value)(Code)
Returns true if the given object is present as a value in this map.
Parameters:
  value - the value to look for true if this map contains the value.



entrySet
public Set<Map.Entry<K, V>> entrySet()(Code)
Returns a Set of Map.Entrys that represent the entries in this EnumMap. Making changes to this Set will change the original EnumMap and vice-versa. Entries can be removed from the Set, or their values can be changed, but new entries cannot be added. The order of the entries in the Set will be the order that the Enum keys were declared in. a Set of Map.Entrys representing the entries inthis EnumMap



equals
public boolean equals(Object object)(Code)
Returns true if this EnumMap is equal to the given object.
Parameters:
  object - the object true if this EnumMap is equal to the given object.



get
public V get(Object key)(Code)
Returns the value stored in this map for the given key in this map, or null if this map has no entry for that key.
Parameters:
  key - the key to get the value for. the value for the given key.



keySet
public Set<K> keySet()(Code)
Returns a Set containing the keys for this EnumMap. Making changes to this Set will change the original EnumMap and vice-versa. Entries can be removed from the Set, but new entries cannot be added. The order of the Set will be the order that the Enum keys were declared in. a Set containing the keys for this EnumMap.



put
public V put(K key, V value)(Code)
Stores a value in this map for the given key. If the map already has an entry for this key the current value will be overwritten.
Parameters:
  key - the key
Parameters:
  value - the value to store for the given key the value stored for the given key, or null if this map has noentry for the key
throws:
  NullPointerException - if the key is null



putAll
public void putAll(Map<? extends K, ? extends V> map)(Code)
Add all the entries in the given map to this map
Parameters:
  map - the map whose entries to copy
throws:
  NullPointerException - if the given map or any of its keys are null



remove
public V remove(Object key)(Code)
Removes the entry for the given key from this map, if there is one.
Parameters:
  key - the key to remove the value that had been stored for the key, or null if there wasnot one.



size
public int size()(Code)
Returns the size of this map the number of entries in the map



values
public Collection<V> values()(Code)
Returns a Collection containing the values for this EnumMap. Making changes to this Collection will change the original EnumMap and vice-versa. Values can be removed from the Collection, but new entries cannot be added. The order of the values in the Collection will be the order that their corresponding Enum keys were declared in. a Collection containing the values for this EnumMap



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