Java Doc for BitSet.java in  » IDE-Netbeans » cnd » antlr » collections » impl » 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 » IDE Netbeans » cnd » antlr.collections.impl 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   antlr.collections.impl.BitSet

BitSet
public class BitSet implements Cloneable(Code)
A BitSet to replace java.util.BitSet. Primary differences are that most set operators return new sets as opposed to oring and anding "in place". Further, a number of operations were added. I cannot contain a BitSet because there is no way to access the internal bits (which I need for speed) and, because it is final, I cannot subclass to add functionality. Consider defining set degree. Without access to the bits, I must call a method n times to test the ith bit...ack! Also seems like or() from util is wrong when size of incoming set is bigger than this.bits.length.
author:
   Terence Parr
author:
  
Pete Wells


Field Summary
final protected static  intBITS
    
final protected static  intLOG_BITS
    
final protected static  intMOD_MASK
    
final protected static  intNIBBLE
    
protected  longbits
    

Constructor Summary
public  BitSet()
    
public  BitSet(long[] bits_)
    
public  BitSet(int nbits)
    

Method Summary
public  voidadd(int el)
    
public  BitSetand(BitSet a)
    
public  voidandInPlace(BitSet a)
    
public  voidclear()
    
public  voidclear(int el)
    
public  Objectclone()
    
public  intdegree()
    
public  booleanequals(Object obj)
    
public static  VectorgetRanges(int[] elems)
     Find ranges in a set element array.
public  voidgrowToInclude(int bit)
     Grows the set to a larger number of bits.
public  intlengthInLongWords()
     return how much space is being used by the bits array not how many actually have member bits on.
public  booleanmember(int el)
    
public  booleannil()
    
public  BitSetnot()
    
public  voidnotInPlace()
    
public  voidnotInPlace(int maxBit)
     complement bits in the range 0..maxBit.
public  voidnotInPlace(int minBit, int maxBit)
     complement bits in the range minBit..maxBit.
public static  BitSetof(int el)
    
public  BitSetor(BitSet a)
    
public  voidorInPlace(BitSet a)
    
public  voidremove(int el)
    
public  intsize()
    
public  booleansubset(BitSet a)
    
public  voidsubtractInPlace(BitSet a)
     Subtract the elements of 'a' from 'this' in-place.
public  int[]toArray()
    
public  long[]toPackedArray()
    
public  StringtoString()
    
public  StringtoString(String separator)
    
public  StringtoString(String separator, CharFormatter formatter)
     Transform a bit set into a string of characters.
Parameters:
  formatter - An object implementing the CharFormatter interface.
public  StringtoString(String separator, Vector vocabulary)
     Create a string representation where instead of integer elements, the ith element of vocabulary is displayed instead.
public  StringtoStringOfHalfWords()
     Dump a comma-separated list of the words making up the bit set.
public  StringtoStringOfWords()
     Dump a comma-separated list of the words making up the bit set.
public  StringtoStringWithRanges(String separator, CharFormatter formatter)
     Print out the bit set but collapse char ranges.

Field Detail
BITS
final protected static int BITS(Code)



LOG_BITS
final protected static int LOG_BITS(Code)



MOD_MASK
final protected static int MOD_MASK(Code)



NIBBLE
final protected static int NIBBLE(Code)



bits
protected long bits(Code)
The actual data bits




Constructor Detail
BitSet
public BitSet()(Code)
Construct a bitset of size one word (64 bits)



BitSet
public BitSet(long[] bits_)(Code)
Construction from a static array of longs



BitSet
public BitSet(int nbits)(Code)
Construct a bitset given the size
Parameters:
  nbits - The size of the bitset in bits




Method Detail
add
public void add(int el)(Code)
or this element into this set (grow as necessary to accommodate)



and
public BitSet and(BitSet a)(Code)



andInPlace
public void andInPlace(BitSet a)(Code)



clear
public void clear()(Code)



clear
public void clear(int el)(Code)



clone
public Object clone()(Code)



degree
public int degree()(Code)



equals
public boolean equals(Object obj)(Code)
code "inherited" from java.util.BitSet



getRanges
public static Vector getRanges(int[] elems)(Code)
Find ranges in a set element array. @param elems The array of elements representing the set, usually from Bit Set.toArray(). Vector of ranges.



growToInclude
public void growToInclude(int bit)(Code)
Grows the set to a larger number of bits.
Parameters:
  bit - element that must fit in set



lengthInLongWords
public int lengthInLongWords()(Code)
return how much space is being used by the bits array not how many actually have member bits on.



member
public boolean member(int el)(Code)



nil
public boolean nil()(Code)



not
public BitSet not()(Code)



notInPlace
public void notInPlace()(Code)



notInPlace
public void notInPlace(int maxBit)(Code)
complement bits in the range 0..maxBit.



notInPlace
public void notInPlace(int minBit, int maxBit)(Code)
complement bits in the range minBit..maxBit.



of
public static BitSet of(int el)(Code)



or
public BitSet or(BitSet a)(Code)
return this | a in a new set



orInPlace
public void orInPlace(BitSet a)(Code)



remove
public void remove(int el)(Code)



size
public int size()(Code)



subset
public boolean subset(BitSet a)(Code)
Is this contained within a?



subtractInPlace
public void subtractInPlace(BitSet a)(Code)
Subtract the elements of 'a' from 'this' in-place. Basically, just turn off all bits of 'this' that are in 'a'.



toArray
public int[] toArray()(Code)



toPackedArray
public long[] toPackedArray()(Code)



toString
public String toString()(Code)



toString
public String toString(String separator)(Code)
Transform a bit set into a string by formatting each element as an integer A commma-separated list of values



toString
public String toString(String separator, CharFormatter formatter)(Code)
Transform a bit set into a string of characters.
Parameters:
  formatter - An object implementing the CharFormatter interface. A commma-separated list of character constants.



toString
public String toString(String separator, Vector vocabulary)(Code)
Create a string representation where instead of integer elements, the ith element of vocabulary is displayed instead. Vocabulary is a Vector of Strings. A commma-separated list of character constants.



toStringOfHalfWords
public String toStringOfHalfWords()(Code)
Dump a comma-separated list of the words making up the bit set. Split each 64 bit number into two more manageable 32 bit numbers. This generates a comma-separated list of C++-like unsigned long constants.



toStringOfWords
public String toStringOfWords()(Code)
Dump a comma-separated list of the words making up the bit set. This generates a comma-separated list of Java-like long int constants.



toStringWithRanges
public String toStringWithRanges(String separator, CharFormatter formatter)(Code)
Print out the bit set but collapse char ranges.



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.