java.lang.Object
org.apache.arrow.memory.util.CommonUtil
Utilities and static methods needed for arrow-memory.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilderindent(StringBuilder sb, int indent) Specify an indentation amount when using a StringBuilder.static intnextPowerOfTwo(int val) Rounds up the provided value to the nearest power of two.static longnextPowerOfTwo(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
-