public final class CommonUtil extends Object
Modifier and Type | Method and Description |
---|---|
static StringBuilder |
indent(StringBuilder sb,
int indent)
Specify an indentation amount when using a StringBuilder.
|
static int |
nextPowerOfTwo(int val)
Rounds up the provided value to the nearest power of two.
|
static long |
nextPowerOfTwo(long val)
Rounds up the provided value to the nearest power of two.
|
public static int nextPowerOfTwo(int val)
val
- An integer value.public static long nextPowerOfTwo(long val)
val
- A long value.public static StringBuilder indent(StringBuilder sb, int indent)
sb
- StringBuilder to useindent
- Indentation amountCopyright © 2023 The Apache Software Foundation. All rights reserved.