Java Doc for ShortBitSet.java in  » Development » PCJ » bak » pcj » set » 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 » PCJ » bak.pcj.set 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


bak.pcj.set.AbstractShortSet
   bak.pcj.set.ShortBitSet

ShortBitSet
public class ShortBitSet extends AbstractShortSet implements ShortSortedSet,Cloneable,Serializable(Code)
This class represents bit array based sets of short values. When a bit in the underlying array is set, the value having the same number as the bit is contained in the array. This implies that bit sets cannot contain negative values.

Implementation of ShortSortedSet is supported from PCJ 1.2. Prior to 1.2, only ShortSet was implemented.

Note: There is no growth policy involved with bit sets. The number of bits to use depends on the value of the largest element and not the size of the set. While sizes are predictable (they grow), a new maximum element is generally not predictable making it meaningless to grow the array at a specific rate.
author:
   Søren Bak
version:
   1.3 21-08-2003 19:54
since:
   1.0




Constructor Summary
public  ShortBitSet(short maximum)
     Creates a new bit set with a specified maximum value.
public  ShortBitSet()
     Creates a new empty bit set with a capacity of 64.
public  ShortBitSet(ShortCollection c)
     Creates a new bit set with the same elements as the specified collection.
public  ShortBitSet(short[] a)
     Creates a new bit set with the same elements as the specified array.

Method Summary
public  booleanadd(short value)
    
public  voidclear()
    
public  Objectclone()
     Returns a clone of this bit set.
public  booleancontains(short value)
    
public  voidensureCapacity(int maximum)
     Ensures that this bit set can contain a specified maximum element without increasing the capacity.
public  shortfirst()
    
public  ShortSortedSetheadSet(short to)
    
public  booleanisEmpty()
    
public  ShortIteratoriterator()
    
public  shortlast()
    
public  booleanremove(short value)
    
public  intsize()
    
public  ShortSortedSetsubSet(short from, short to)
    
public  ShortSortedSettailSet(short from)
    
public  voidtrimToSize()
     Minimizes the memory used by this bit set.


Constructor Detail
ShortBitSet
public ShortBitSet(short maximum)(Code)
Creates a new bit set with a specified maximum value.
Parameters:
  maximum - the maximum value representable by the new bitset.
throws:
  IllegalArgumentException - if capacity is negative.



ShortBitSet
public ShortBitSet()(Code)
Creates a new empty bit set with a capacity of 64.



ShortBitSet
public ShortBitSet(ShortCollection c)(Code)
Creates a new bit set with the same elements as the specified collection.
Parameters:
  c - the collection whose elements to add to the newbit set.
throws:
  NullPointerException - if c is null.
throws:
  IllegalArgumentException - if any of the elements of the specified collectionis negative.



ShortBitSet
public ShortBitSet(short[] a)(Code)
Creates a new bit set with the same elements as the specified array.
Parameters:
  a - the array whose elements to add to the newbit set.
throws:
  NullPointerException - if a is null.
throws:
  IllegalArgumentException - if any of the elements of the specified arrayis negative.
since:
   1.1




Method Detail
add
public boolean add(short value)(Code)

throws:
  IllegalArgumentException - if value is negative.



clear
public void clear()(Code)



clone
public Object clone()(Code)
Returns a clone of this bit set. a clone of this bit set.
since:
   1.1



contains
public boolean contains(short value)(Code)



ensureCapacity
public void ensureCapacity(int maximum)(Code)
Ensures that this bit set can contain a specified maximum element without increasing the capacity. If many elements are added, and the maximum element among those is known before they are added, this method may improve performance.
Parameters:
  maximum - the maximum element that this set should be ableto contain without increasing the capacity.
throws:
  IllegalArgumentException - if maximum is negative.



first
public short first()(Code)

since:
   1.2



headSet
public ShortSortedSet headSet(short to)(Code)

since:
   1.2



isEmpty
public boolean isEmpty()(Code)



iterator
public ShortIterator iterator()(Code)



last
public short last()(Code)

since:
   1.2



remove
public boolean remove(short value)(Code)



size
public int size()(Code)



subSet
public ShortSortedSet subSet(short from, short to)(Code)

since:
   1.2



tailSet
public ShortSortedSet tailSet(short from)(Code)

since:
   1.2



trimToSize
public void trimToSize()(Code)
Minimizes the memory used by this bit set. The underlying array is replaced by an array whose size corresponds to the maximum elements in this bit set. The method can be used to free up memory after many removals.



Methods inherited from bak.pcj.set.AbstractShortSet
public boolean equals(Object obj)(Code)(Java Doc)
public int hashCode()(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.