Java Doc for LinkedHashMap.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.LinkedHashMap

LinkedHashMap
public class LinkedHashMap extends HashMap (Code)
LinkedHashMap is a variant on HashMap. Its entries are kept in a doubly-linked list. The iteration order is, by default, the order in which keys were inserted.

If the three argument constructor is used, and order is specified as true, the iteration would be in the order that entries were accessed. The access order gets affected by put(), get(), putAll() operations, but not by operations on the collection views.

Null elements are allowed, and all the optional Map operations are supported.


since:
   1.4


Inner Class :final static class LinkedHashMapEntrySet extends HashMapEntrySet
Inner Class :final static class LinkedHashMapEntry extends Entry


Constructor Summary
public  LinkedHashMap()
     Constructs a new empty instance of LinkedHashMap.
public  LinkedHashMap(int s)
     Constructor with specified size.
public  LinkedHashMap(int s, float lf)
     Constructor with specified size and load factor.
public  LinkedHashMap(int s, float lf, boolean order)
    
public  LinkedHashMap(Map<? extends K, ? extends V> m)
    

Method Summary
public  voidclear()
     Removes all mappings from this HashMap, leaving it empty.
public  booleancontainsValue(Object value)
     Searches this map for the specified value.
 Entry<K, V>createEntry(K key, int index, V value)
    
 Entry<K, V>createHashedEntry(K key, int index, int hash)
    
public  Set<Map.Entry<K, V>>entrySet()
     Answers a Set of the mappings contained in this HashMap.
public  Vget(Object key)
     Retrieve the map value corresponding to the given key.
public  Set<K>keySet()
     Answers a Set of the keys contained in this HashMap.
 voidlinkEntry(LinkedHashMapEntry<K, V> m)
    
 Entry<K, V>[]newElementArray(int s)
    
public  Vput(K key, V value)
     Set the mapped value for the given key to the given value.
 VputImpl(K key, V value)
    
public  Vremove(Object key)
     Remove the entry corresponding to the given key.
protected  booleanremoveEldestEntry(Map.Entry<K, V> eldest)
     This method is queried from the put and putAll methods to check if the eldest member of the map should be deleted before adding the new member.
public  Collection<V>values()
     Answers a Collection of the values contained in this HashMap.


Constructor Detail
LinkedHashMap
public LinkedHashMap()(Code)
Constructs a new empty instance of LinkedHashMap.



LinkedHashMap
public LinkedHashMap(int s)(Code)
Constructor with specified size.
Parameters:
  s - Size of LinkedHashMap required



LinkedHashMap
public LinkedHashMap(int s, float lf)(Code)
Constructor with specified size and load factor.
Parameters:
  s - Size of LinkedHashMap required
Parameters:
  lf - Load factor



LinkedHashMap
public LinkedHashMap(int s, float lf, boolean order)(Code)
Constructor with specified size, load factor and access order
Parameters:
  s - Size of LinkedHashmap required
Parameters:
  lf - Load factor
Parameters:
  order - If true indicates that traversal order should begin with mostrecently accessed



LinkedHashMap
public LinkedHashMap(Map<? extends K, ? extends V> m)(Code)
Constructor with input map
Parameters:
  m - Input map




Method Detail
clear
public void clear()(Code)
Removes all mappings from this HashMap, leaving it empty.
See Also:   LinkedHashMap.isEmpty()
See Also:   LinkedHashMap.size()



containsValue
public boolean containsValue(Object value)(Code)
Searches this map for the specified value.
Parameters:
  value - the object to search for true if value is a value of this HashMap, falseotherwise



createEntry
Entry<K, V> createEntry(K key, int index, V value)(Code)



createHashedEntry
Entry<K, V> createHashedEntry(K key, int index, int hash)(Code)



entrySet
public Set<Map.Entry<K, V>> entrySet()(Code)
Answers a Set of the mappings contained in this HashMap. Each element in the set is a Map.Entry. The set is backed by this HashMap so changes to one are reflected by the other. The set does not support adding. a Set of the mappings



get
public V get(Object key)(Code)
Retrieve the map value corresponding to the given key.
Parameters:
  key - Key value mapped value or null if the key is not in the map



keySet
public Set<K> keySet()(Code)
Answers a Set of the keys contained in this HashMap. The set is backed by this HashMap so changes to one are reflected by the other. The set does not support adding. a Set of the keys



linkEntry
void linkEntry(LinkedHashMapEntry<K, V> m)(Code)



newElementArray
Entry<K, V>[] newElementArray(int s)(Code)
Create a new element array
Parameters:
  s - Reference to the element array



put
public V put(K key, V value)(Code)
Set the mapped value for the given key to the given value.
Parameters:
  key - Key value
Parameters:
  value - New mapped value The old value if the key was already in the map or nullotherwise.



putImpl
V putImpl(K key, V value)(Code)



remove
public V remove(Object key)(Code)
Remove the entry corresponding to the given key.
Parameters:
  key - the key the value associated with the key or null if the key was no inthe map



removeEldestEntry
protected boolean removeEldestEntry(Map.Entry<K, V> eldest)(Code)
This method is queried from the put and putAll methods to check if the eldest member of the map should be deleted before adding the new member. If this map was created with accessOrder = true, then the result of removeEldesrEntry is assumed to be false.
Parameters:
  eldest - true if the eldest member should be removed



values
public Collection<V> values()(Code)
Answers a Collection of the values contained in this HashMap. The collection is backed by this HashMap so changes to one are reflected by the other. The collection does not support adding. a Collection of the values



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