Java Doc for THashMap.java in  » Development » trove » gnu » trove » 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 » Development » trove » gnu.trove 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


gnu.trove.THashMap

THashMap
public class THashMap extends TObjectHash implements Map<K, V>,Externalizable(Code)
An implementation of the Map interface which uses an open addressed hash table to store its contents. Created: Sun Nov 4 08:52:45 2001
author:
   Eric D. Friedman
version:
   $Id: THashMap.java,v 1.26 2007/06/29 20:03:10 robeden Exp $

Inner Class :protected class ValueView extends MapBackedView
Inner Class :protected class EntryView extends MapBackedView>
Inner Class :protected class KeyView extends MapBackedView
Inner Class :final class Entry implements Map.Entry<K, V>

Field Summary
protected transient  V[]_values
    
final static  longserialVersionUID
    

Constructor Summary
public  THashMap()
     Creates a new THashMap instance with the default capacity and load factor.
public  THashMap(TObjectHashingStrategy<K> strategy)
     Creates a new THashMap instance with the default capacity and load factor.
public  THashMap(int initialCapacity)
     Creates a new THashMap instance with a prime capacity equal to or greater than initialCapacity and with the default load factor.
public  THashMap(int initialCapacity, TObjectHashingStrategy<K> strategy)
     Creates a new THashMap instance with a prime capacity equal to or greater than initialCapacity and with the default load factor.
public  THashMap(int initialCapacity, float loadFactor)
     Creates a new THashMap instance with a prime capacity equal to or greater than initialCapacity and with the specified load factor.
public  THashMap(int initialCapacity, float loadFactor, TObjectHashingStrategy<K> strategy)
     Creates a new THashMap instance with a prime capacity equal to or greater than initialCapacity and with the specified load factor.
public  THashMap(Map<K, V> map)
     Creates a new THashMap instance which contains the key/value pairs in map.
public  THashMap(Map<K, V> map, TObjectHashingStrategy<K> strategy)
     Creates a new THashMap instance which contains the key/value pairs in map.

Method Summary
public  voidclear()
     Empties the map.
public  THashMap<K, V>clone()
    
public  booleancontainsKey(Object key)
     checks for the present of key in the keys of the map.
public  booleancontainsValue(Object val)
     checks for the presence of val in the values of the map.
public  Set<Map.Entry<K, V>>entrySet()
     Returns a Set view on the entries of the map.
public  booleanequals(Object other)
     Compares this map with another map for equality of their stored entries.
public  booleanforEachEntry(TObjectObjectProcedure<K, V> procedure)
     Executes procedure for each key/value entry in the map.
public  booleanforEachKey(TObjectProcedure<K> procedure)
     Executes procedure for each key in the map.
public  booleanforEachValue(TObjectProcedure<V> procedure)
     Executes procedure for each value in the map.
public  Vget(Object key)
    
public  inthashCode()
    
public  Set<K>keySet()
     returns a Set view on the keys of the map.
public  Vput(K key, V value)
     Inserts a key/value pair into the map.
public  voidputAll(Map<? extends K, ? extends V> map)
     copies the key/value mappings in map into this map.
public  voidreadExternal(ObjectInput in)
    
protected  voidrehash(int newCapacity)
     rehashes the map to the new capacity.
public  Vremove(Object key)
     Deletes a key/value pair from the map.
protected  voidremoveAt(int index)
     removes the mapping at index from the map.
public  booleanretainEntries(TObjectObjectProcedure<K, V> procedure)
     Retains only those entries in the map for which the procedure returns a true value.
protected  intsetUp(int initialCapacity)
     initialize the value array of the map.
public  StringtoString()
    
public  voidtransformValues(TObjectFunction<V, V> function)
     Transform the values in this map using function.
public  Collection<V>values()
     Returns a view on the values of the map.
public  voidwriteExternal(ObjectOutput out)
    

Field Detail
_values
protected transient V[] _values(Code)
the values of the map



serialVersionUID
final static long serialVersionUID(Code)




Constructor Detail
THashMap
public THashMap()(Code)
Creates a new THashMap instance with the default capacity and load factor.



THashMap
public THashMap(TObjectHashingStrategy<K> strategy)(Code)
Creates a new THashMap instance with the default capacity and load factor.
Parameters:
  strategy - used to compute hash codes and to compare objects.



THashMap
public THashMap(int initialCapacity)(Code)
Creates a new THashMap instance with a prime capacity equal to or greater than initialCapacity and with the default load factor.
Parameters:
  initialCapacity - an int value



THashMap
public THashMap(int initialCapacity, TObjectHashingStrategy<K> strategy)(Code)
Creates a new THashMap instance with a prime capacity equal to or greater than initialCapacity and with the default load factor.
Parameters:
  initialCapacity - an int value
Parameters:
  strategy - used to compute hash codes and to compare objects.



THashMap
public THashMap(int initialCapacity, float loadFactor)(Code)
Creates a new THashMap instance with a prime capacity equal to or greater than initialCapacity and with the specified load factor.
Parameters:
  initialCapacity - an int value
Parameters:
  loadFactor - a float value



THashMap
public THashMap(int initialCapacity, float loadFactor, TObjectHashingStrategy<K> strategy)(Code)
Creates a new THashMap instance with a prime capacity equal to or greater than initialCapacity and with the specified load factor.
Parameters:
  initialCapacity - an int value
Parameters:
  loadFactor - a float value
Parameters:
  strategy - used to compute hash codes and to compare objects.



THashMap
public THashMap(Map<K, V> map)(Code)
Creates a new THashMap instance which contains the key/value pairs in map.
Parameters:
  map - a Map value



THashMap
public THashMap(Map<K, V> map, TObjectHashingStrategy<K> strategy)(Code)
Creates a new THashMap instance which contains the key/value pairs in map.
Parameters:
  map - a Map value
Parameters:
  strategy - used to compute hash codes and to compare objects.




Method Detail
clear
public void clear()(Code)
Empties the map.



clone
public THashMap<K, V> clone()(Code)
a shallow clone of this collection



containsKey
public boolean containsKey(Object key)(Code)
checks for the present of key in the keys of the map.
Parameters:
  key - an Object value a boolean value



containsValue
public boolean containsValue(Object val)(Code)
checks for the presence of val in the values of the map.
Parameters:
  val - an Object value a boolean value



entrySet
public Set<Map.Entry<K, V>> entrySet()(Code)
Returns a Set view on the entries of the map. a Set value



equals
public boolean equals(Object other)(Code)
Compares this map with another map for equality of their stored entries.
Parameters:
  other - an Object value a boolean value



forEachEntry
public boolean forEachEntry(TObjectObjectProcedure<K, V> procedure)(Code)
Executes procedure for each key/value entry in the map.
Parameters:
  procedure - a TObjectObjectProcedure value false if the loop over the entries terminated becausethe procedure returned false for some entry.



forEachKey
public boolean forEachKey(TObjectProcedure<K> procedure)(Code)
Executes procedure for each key in the map.
Parameters:
  procedure - a TObjectProcedure value false if the loop over the keys terminated becausethe procedure returned false for some key.



forEachValue
public boolean forEachValue(TObjectProcedure<V> procedure)(Code)
Executes procedure for each value in the map.
Parameters:
  procedure - a TObjectProcedure value false if the loop over the values terminated becausethe procedure returned false for some value.



get
public V get(Object key)(Code)
retrieves the value for key
Parameters:
  key - an Object value the value of key or null if no such mapping exists.



hashCode
public int hashCode()(Code)



keySet
public Set<K> keySet()(Code)
returns a Set view on the keys of the map. a Set value



put
public V put(K key, V value)(Code)
Inserts a key/value pair into the map.
Parameters:
  key - an Object value
Parameters:
  value - an Object value the previous value associated with key,or null if none was found.



putAll
public void putAll(Map<? extends K, ? extends V> map)(Code)
copies the key/value mappings in map into this map.
Parameters:
  map - a Map value



readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException(Code)



rehash
protected void rehash(int newCapacity)(Code)
rehashes the map to the new capacity.
Parameters:
  newCapacity - an int value



remove
public V remove(Object key)(Code)
Deletes a key/value pair from the map.
Parameters:
  key - an Object value an Object value



removeAt
protected void removeAt(int index)(Code)
removes the mapping at index from the map.
Parameters:
  index - an int value



retainEntries
public boolean retainEntries(TObjectObjectProcedure<K, V> procedure)(Code)
Retains only those entries in the map for which the procedure returns a true value.
Parameters:
  procedure - determines which entries to keep true if the map was modified.



setUp
protected int setUp(int initialCapacity)(Code)
initialize the value array of the map.
Parameters:
  initialCapacity - an int value an int value



toString
public String toString()(Code)



transformValues
public void transformValues(TObjectFunction<V, V> function)(Code)
Transform the values in this map using function.
Parameters:
  function - a TObjectFunction value



values
public Collection<V> values()(Code)
Returns a view on the values of the map. a Collection value



writeExternal
public void writeExternal(ObjectOutput out) throws IOException(Code)



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