com.ctc.wstx.util
Class DataUtil
java.lang.Object
com.ctc.wstx.util.DataUtil
public final class DataUtil
- extends java.lang.Object
Method Summary |
static boolean |
anyValuesInCommon(java.util.Collection c1,
java.util.Collection c2)
Method that can be used to efficiently check if 2 collections
share at least one common element. |
static char[] |
getEmptyCharArray()
|
static int[] |
growArrayBy(int[] arr,
int more)
|
static java.lang.String[] |
growArrayBy(java.lang.String[] arr,
int more)
|
static java.lang.Object |
growArrayBy50Pct(java.lang.Object arr)
|
static java.lang.Object |
growArrayToAtLeast(java.lang.Object arr,
int minLen)
Method similar to growArrayBy50Pct(java.lang.Object) , but it also ensures that
the new size is at least as big as the specified minimum size. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getEmptyCharArray
public static char[] getEmptyCharArray()
anyValuesInCommon
public static boolean anyValuesInCommon(java.util.Collection c1,
java.util.Collection c2)
- Method that can be used to efficiently check if 2 collections
share at least one common element.
- Returns:
- True if there is at least one element that's common
to both Collections, ie. that is contained in both of them.
growArrayBy50Pct
public static java.lang.Object growArrayBy50Pct(java.lang.Object arr)
growArrayToAtLeast
public static java.lang.Object growArrayToAtLeast(java.lang.Object arr,
int minLen)
- Method similar to
growArrayBy50Pct(java.lang.Object)
, but it also ensures that
the new size is at least as big as the specified minimum size.
growArrayBy
public static java.lang.String[] growArrayBy(java.lang.String[] arr,
int more)
growArrayBy
public static int[] growArrayBy(int[] arr,
int more)