Java Doc for BitLevel.java in  » Apache-Harmony-Java-SE » java-package » java » math » 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 » Apache Harmony Java SE » java package » java.math 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.math.BitLevel

BitLevel
class BitLevel (Code)
Static library that provides all the bit level operations for BigInteger . The operations are:
  • Left Shifting
  • Right Shifting
  • Bit clearing
  • Bit setting
  • Bit counting
  • Bit testing
  • Getting of the lowest bit set
All operations are provided in immutable way, and some in both mutable and immutable.
author:
   Intel Middleware Product Division
author:
   Instituto Tecnologico de Cordoba




Method Summary
static  intbitCount(BigInteger val)
    
static  intbitLength(BigInteger val)
    
static  BigIntegerflipBit(BigInteger val, int n)
     Performs a flipBit on the BigInteger, returning a BigInteger with the the specified bit flipped.
static  voidinplaceShiftLeft(BigInteger val, int count)
     Performs val <<= count .
static  voidinplaceShiftRight(BigInteger val, int count)
     Performs val >>= count where val is a positive number.
static  booleannonZeroDroppedBits(int numberOfBits, int digits)
    
static  BigIntegershiftLeft(BigInteger source, int count)
    
static  voidshiftLeft(int result, int source, int intCount, int count)
     Abstractly shifts left an array of integers in little endian (i.e.
static  BigIntegershiftRight(BigInteger source, int count)
    
static  booleanshiftRight(int result, int resultLen, int source, int intCount, int count)
     Shifts right an array of integers.
static  booleantestBit(BigInteger val, int n)
     Performs a fast bit testing for positive numbers.



Method Detail
bitCount
static int bitCount(BigInteger val)(Code)

See Also:   BigInteger.bitCount
See Also:   



bitLength
static int bitLength(BigInteger val)(Code)

See Also:   BigInteger.bitLength
See Also:   



flipBit
static BigInteger flipBit(BigInteger val, int n)(Code)
Performs a flipBit on the BigInteger, returning a BigInteger with the the specified bit flipped. intCount: the index of the element of the digits array where the operation will be performed bitNumber: the bit's position in the intCount element



inplaceShiftLeft
static void inplaceShiftLeft(BigInteger val, int count)(Code)
Performs val <<= count .



inplaceShiftRight
static void inplaceShiftRight(BigInteger val, int count)(Code)
Performs val >>= count where val is a positive number.



nonZeroDroppedBits
static boolean nonZeroDroppedBits(int numberOfBits, int digits)(Code)
Check if there are 1s in the lowest bits of this BigInteger
Parameters:
  numberOfBits - the number of the lowest bits to check false if all bits are 0s, true otherwise



shiftLeft
static BigInteger shiftLeft(BigInteger source, int count)(Code)

See Also:   BigInteger.shiftLeft(int)
See Also:   



shiftLeft
static void shiftLeft(int result, int source, int intCount, int count)(Code)
Abstractly shifts left an array of integers in little endian (i.e. shift it right). Total shift distance in bits is intCount * 32 + count
Parameters:
  result - the destination array
Parameters:
  source - the source array
Parameters:
  intCount - the shift distance in integers
Parameters:
  count - an additional shift distance in bits



shiftRight
static BigInteger shiftRight(BigInteger source, int count)(Code)

See Also:   BigInteger.shiftRight(int)
See Also:   



shiftRight
static boolean shiftRight(int result, int resultLen, int source, int intCount, int count)(Code)
Shifts right an array of integers. Total shift distance in bits is intCount * 32 + count.
Parameters:
  result - the destination array
Parameters:
  resultLen - the destination array's length
Parameters:
  source - the source array
Parameters:
  intCount - the number of elements to be shifted
Parameters:
  count - the number of bits to be shifted dropped bit's are all zero (i.e. remaider is zero)



testBit
static boolean testBit(BigInteger val, int n)(Code)
Performs a fast bit testing for positive numbers. The bit to to be tested must be in the range [0, val.bitLength()-1]



Methods inherited from java.lang.Object
protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object object)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final public Class<? extends Object> getClass()(Code)(Java Doc)
public int hashCode()(Code)(Java Doc)
final public void notify()(Code)(Java Doc)
final public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final public void wait(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait(long millis) 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.