Java Doc for StringCache.java in  » Portal » stringbeans-3.5 » com » nabhinc » util » md » 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 » Portal » stringbeans 3.5 » com.nabhinc.util.md 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.nabhinc.util.md.StringCache

StringCache
public class StringCache (Code)
This class implements a String cache for ByteChunk and CharChunk.
author:
   Remy Maucherat

Inner Class :public static class ByteEntry
Inner Class :public static class CharEntry

Field Summary
protected static  intaccessCount
     Access count.
protected static  ByteEntry[]bcCache
     Cache for byte chunk.
protected static  intbcCount
     toString count for byte chunk.
protected static  HashMapbcStats
     Statistics hash map for byte chunk.
protected static  booleanbyteEnabled
    
protected static  intcacheSize
    
protected static  CharEntry[]ccCache
     Cache for char chunk.
protected static  intccCount
     toString count for char chunk.
protected static  HashMapccStats
     Statistics hash map for char chunk.
protected static  booleancharEnabled
    
protected static  inthitCount
     Hit count.
protected static  inttrainThreshold
    


Method Summary
final protected static  intcompare(ByteChunk name, byte[] compareTo)
     Compare given byte chunk with byte array.
final protected static  intcompare(CharChunk name, char[] compareTo)
     Compare given char chunk with char array.
final protected static  Stringfind(ByteChunk name)
     Find an entry given its name in the cache and return the associated String.
final protected static  Stringfind(CharChunk name)
     Find an entry given its name in the cache and return the associated String.
final protected static  intfindClosest(ByteChunk name, ByteEntry[] array, int len)
     Find an entry given its name in a sorted array of map elements.
final protected static  intfindClosest(CharChunk name, CharEntry[] array, int len)
     Find an entry given its name in a sorted array of map elements.
public  intgetAccessCount()
    
public  booleangetByteEnabled()
    
public  intgetCacheSize()
    
public  booleangetCharEnabled()
    
public  intgetHitCount()
    
public  intgetTrainThreshold()
    
public  voidreset()
    
public  voidsetByteEnabled(boolean byteEnabled)
    
public  voidsetCacheSize(int cacheSize)
    
public  voidsetCharEnabled(boolean charEnabled)
    
public  voidsetTrainThreshold(int trainThreshold)
    
public static  StringtoString(ByteChunk bc)
    
public static  StringtoString(CharChunk cc)
    

Field Detail
accessCount
protected static int accessCount(Code)
Access count.



bcCache
protected static ByteEntry[] bcCache(Code)
Cache for byte chunk.



bcCount
protected static int bcCount(Code)
toString count for byte chunk.



bcStats
protected static HashMap bcStats(Code)
Statistics hash map for byte chunk.



byteEnabled
protected static boolean byteEnabled(Code)
Enabled ?



cacheSize
protected static int cacheSize(Code)



ccCache
protected static CharEntry[] ccCache(Code)
Cache for char chunk.



ccCount
protected static int ccCount(Code)
toString count for char chunk.



ccStats
protected static HashMap ccStats(Code)
Statistics hash map for char chunk.



charEnabled
protected static boolean charEnabled(Code)



hitCount
protected static int hitCount(Code)
Hit count.



trainThreshold
protected static int trainThreshold(Code)





Method Detail
compare
final protected static int compare(ByteChunk name, byte[] compareTo)(Code)
Compare given byte chunk with byte array. Return -1, 0 or +1 if inferior, equal, or superior to the String.



compare
final protected static int compare(CharChunk name, char[] compareTo)(Code)
Compare given char chunk with char array. Return -1, 0 or +1 if inferior, equal, or superior to the String.



find
final protected static String find(ByteChunk name)(Code)
Find an entry given its name in the cache and return the associated String.



find
final protected static String find(CharChunk name)(Code)
Find an entry given its name in the cache and return the associated String.



findClosest
final protected static int findClosest(ByteChunk name, ByteEntry[] array, int len)(Code)
Find an entry given its name in a sorted array of map elements. This will return the index for the closest inferior or equal item in the given array.



findClosest
final protected static int findClosest(CharChunk name, CharEntry[] array, int len)(Code)
Find an entry given its name in a sorted array of map elements. This will return the index for the closest inferior or equal item in the given array.



getAccessCount
public int getAccessCount()(Code)
Returns the accessCount.



getByteEnabled
public boolean getByteEnabled()(Code)
Returns the enabled.



getCacheSize
public int getCacheSize()(Code)
Returns the cacheSize.



getCharEnabled
public boolean getCharEnabled()(Code)
Returns the enabled.



getHitCount
public int getHitCount()(Code)
Returns the hitCount.



getTrainThreshold
public int getTrainThreshold()(Code)
Returns the trainThreshold.



reset
public void reset()(Code)



setByteEnabled
public void setByteEnabled(boolean byteEnabled)(Code)

Parameters:
  byteEnabled - The enabled to set.



setCacheSize
public void setCacheSize(int cacheSize)(Code)

Parameters:
  cacheSize - The cacheSize to set.



setCharEnabled
public void setCharEnabled(boolean charEnabled)(Code)

Parameters:
  charEnabled - The enabled to set.



setTrainThreshold
public void setTrainThreshold(int trainThreshold)(Code)

Parameters:
  trainThreshold - The trainThreshold to set.



toString
public static String toString(ByteChunk bc)(Code)



toString
public static String toString(CharChunk cc)(Code)



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.