| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | Returns: true if the value is a power of 2 otherwise false.to be tested to see if it is a power of two. value)Is this value a power of two. |
| public static int | Returns: the next positive power of 2 or this value if it is a power of 2.from which next positive power of two will be found. value)Find the next larger positive power of two value up from the given value. |
| Pow2 | back to summary |
|---|---|
| private Pow2() | |
| isPowerOfTwo | back to summary |
|---|---|
| public static boolean isPowerOfTwo(final int value) Is this value a power of two.
| |
| roundToPowerOfTwo | back to summary |
|---|---|
| public static int roundToPowerOfTwo(final int value) Find the next larger positive power of two value up from the given value. If value is a power of two then this value will be returned.
| |