Java Doc for AbstractMap.java in  » Search-Engine » Jofti » com » jofti » 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 » Search Engine » Jofti » com.jofti.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jofti.util.AbstractMap

All known Subclasses:   com.jofti.util.ValueTreeMap,  com.jofti.util.OpenHashMap,
AbstractMap
abstract public class AbstractMap (Code)
Abstract base class for hash maps holding objects or primitive data types such as int, float, etc. as keys and/or values. First see the package summary and javadoc tree view to get the broad picture.

Note that implementations are not synchronized.
author:
   steve@jofti.com
author:
   wolfgang.hoschek@cern.ch
version:
   1.1, 03/01/06
version:
   1.0, 09/24/99
See Also:   java.util.HashMap



Field Summary
final protected static  intdefaultCapacity
    
final protected static  doubledefaultMaxLoadFactor
    
final protected static  doubledefaultMinLoadFactor
    
protected  intdistinct
     The number of distinct associations in the map; its "size()".
protected  inthighWaterMark
    
protected  intlowWaterMark
     The table capacity c=table.length always satisfies the invariant c * minLoadFactor <= s <= c * maxLoadFactor, where s=size() is the number of associations currently contained.
protected  doublemaxLoadFactor
     The maximum load factor for the hashtable.
protected  doubleminLoadFactor
     The minimum load factor for the hashtable.

Constructor Summary
protected  AbstractMap()
     Makes this class non instantiable, but still let's others inherit from it.

Method Summary
protected  intchooseGrowCapacity(int size, double minLoad, double maxLoad)
     Chooses a new prime table capacity optimized for growing that (approximately) satisfies the invariant c * minLoadFactor <= size <= c * maxLoadFactor and has at least one FREE slot for the given size.
protected  intchooseHighWaterMark(int capacity, double maxLoad)
     Returns new high water mark threshold based on current capacity and maxLoadFactor.
protected  intchooseLowWaterMark(int capacity, double minLoad)
     Returns new low water mark threshold based on current capacity and minLoadFactor.
protected  intchooseMeanCapacity(int size, double minLoad, double maxLoad)
     Chooses a new prime table capacity neither favoring shrinking nor growing, that (approximately) satisfies the invariant c * minLoadFactor <= size <= c * maxLoadFactor and has at least one FREE slot for the given size.
protected  intchooseShrinkCapacity(int size, double minLoad, double maxLoad)
     Chooses a new prime table capacity optimized for shrinking that (approximately) satisfies the invariant c * minLoadFactor <= size <= c * maxLoadFactor and has at least one FREE slot for the given size.
abstract public  voidclear()
     Removes all (key,value) associations from the receiver.
abstract public  voidensureCapacity(int minCapacity)
     Ensures that the receiver can hold at least the specified number of elements without needing to allocate new internal memory.
public  booleanisEmpty()
     Returns true if the receiver contains no (key,value) associations.
protected  intnextPrime(int desiredCapacity)
     Returns a prime number which is >= desiredCapacity and very close to desiredCapacity (within 11% if desiredCapacity >= 1000).
Parameters:
  desiredCapacity - the capacity desired by the user.
protected  voidsetUp(int initialCapacity, double minLoadFactor, double maxLoadFactor)
     Initializes the receiver.
public  intsize()
     Returns the number of (key,value) associations currently contained.
abstract public  voidtrimToSize()
     Trims the capacity of the receiver to be the receiver's current size.

Field Detail
defaultCapacity
final protected static int defaultCapacity(Code)



defaultMaxLoadFactor
final protected static double defaultMaxLoadFactor(Code)



defaultMinLoadFactor
final protected static double defaultMinLoadFactor(Code)



distinct
protected int distinct(Code)
The number of distinct associations in the map; its "size()".



highWaterMark
protected int highWaterMark(Code)



lowWaterMark
protected int lowWaterMark(Code)
The table capacity c=table.length always satisfies the invariant c * minLoadFactor <= s <= c * maxLoadFactor, where s=size() is the number of associations currently contained. The term "c * minLoadFactor" is called the "lowWaterMark", "c * maxLoadFactor" is called the "highWaterMark". In other words, the table capacity (and proportionally the memory used by this class) oscillates within these constraints. The terms are precomputed and cached to avoid recalculating them each time put(..) or removeKey(...) is called.



maxLoadFactor
protected double maxLoadFactor(Code)
The maximum load factor for the hashtable.



minLoadFactor
protected double minLoadFactor(Code)
The minimum load factor for the hashtable.




Constructor Detail
AbstractMap
protected AbstractMap()(Code)
Makes this class non instantiable, but still let's others inherit from it.




Method Detail
chooseGrowCapacity
protected int chooseGrowCapacity(int size, double minLoad, double maxLoad)(Code)
Chooses a new prime table capacity optimized for growing that (approximately) satisfies the invariant c * minLoadFactor <= size <= c * maxLoadFactor and has at least one FREE slot for the given size.



chooseHighWaterMark
protected int chooseHighWaterMark(int capacity, double maxLoad)(Code)
Returns new high water mark threshold based on current capacity and maxLoadFactor. int the new threshold.



chooseLowWaterMark
protected int chooseLowWaterMark(int capacity, double minLoad)(Code)
Returns new low water mark threshold based on current capacity and minLoadFactor. int the new threshold.



chooseMeanCapacity
protected int chooseMeanCapacity(int size, double minLoad, double maxLoad)(Code)
Chooses a new prime table capacity neither favoring shrinking nor growing, that (approximately) satisfies the invariant c * minLoadFactor <= size <= c * maxLoadFactor and has at least one FREE slot for the given size.



chooseShrinkCapacity
protected int chooseShrinkCapacity(int size, double minLoad, double maxLoad)(Code)
Chooses a new prime table capacity optimized for shrinking that (approximately) satisfies the invariant c * minLoadFactor <= size <= c * maxLoadFactor and has at least one FREE slot for the given size.



clear
abstract public void clear()(Code)
Removes all (key,value) associations from the receiver.



ensureCapacity
abstract public void ensureCapacity(int minCapacity)(Code)
Ensures that the receiver can hold at least the specified number of elements without needing to allocate new internal memory. If necessary, allocates new internal memory and increases the capacity of the receiver.

This method never need be called; it is for performance tuning only. Calling this method before put()ing a large number of associations boosts performance, because the receiver will grow only once instead of potentially many times.

This default implementation does nothing. Override this method if necessary.
Parameters:
  minCapacity - the desired minimum capacity.




isEmpty
public boolean isEmpty()(Code)
Returns true if the receiver contains no (key,value) associations. true if the receiver contains no (key,value) associations.



nextPrime
protected int nextPrime(int desiredCapacity)(Code)
Returns a prime number which is >= desiredCapacity and very close to desiredCapacity (within 11% if desiredCapacity >= 1000).
Parameters:
  desiredCapacity - the capacity desired by the user. the capacity which should be used for a hashtable.



setUp
protected void setUp(int initialCapacity, double minLoadFactor, double maxLoadFactor)(Code)
Initializes the receiver. You will almost certainly need to override this method in subclasses to initialize the hash table.
Parameters:
  initialCapacity - the initial capacity of the receiver.
Parameters:
  minLoadFactor - the minLoadFactor of the receiver.
Parameters:
  maxLoadFactor - the maxLoadFactor of the receiver.
throws:
  IllegalArgumentException - if initialCapacity < 0 || (minLoadFactor < 0.0 || minLoadFactor >= 1.0) || (maxLoadFactor <= 0.0 || maxLoadFactor >= 1.0) || (minLoadFactor >= maxLoadFactor).



size
public int size()(Code)
Returns the number of (key,value) associations currently contained. the number of (key,value) associations currently contained.



trimToSize
abstract public void trimToSize()(Code)
Trims the capacity of the receiver to be the receiver's current size. Releases any superfluous internal memory. An application can use this operation to minimize the storage of the receiver.

This default implementation does nothing. Override this method if necessary.




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.