java.lang.Object
org.apache.arrow.memory.util.CommonUtil
Utilities and static methods needed for arrow-memory.
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Method Details
-
nextPowerOfTwo
public static int nextPowerOfTwo(int val) Rounds up the provided value to the nearest power of two.- Parameters:
val
- An integer value.- Returns:
- The closest power of two of that value.
-
nextPowerOfTwo
public static long nextPowerOfTwo(long val) Rounds up the provided value to the nearest power of two.- Parameters:
val
- A long value.- Returns:
- The closest power of two of that value.
-
indent
Specify an indentation amount when using a StringBuilder.- Parameters:
sb
- StringBuilder to useindent
- Indentation amount- Returns:
- the StringBuilder object with indentation applied
-