Top Inners Fields Constructors Methods
com.ctc.wstx.util

public final Class DataUtil

extends Object
Class Inheritance
Imports
java.lang.reflect.Array, java.util.*, org.codehaus.stax2.ri.SingletonIterator

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
pack-priv static final char[]
pack-priv static final Long
pack-priv static final String

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static <T> boolean

Returns:

True if there is at least one element that's common to both Collections, ie. that is contained in both of them.
anyValuesInCommon
(Collection<T> c1, Collection<T> c2)

Method that can be used to efficiently check if 2 collections share at least one common element.

public static <T> Iterator<T>
public static char[]
public static String[]
growArrayBy(String[] arr, int more)

public static int[]
growArrayBy(int[] arr, int more)

public static Object
public static Object
growArrayToAtLeast(Object arr, int minLen)

Method similar to growArrayBy50Pct, but it also ensures that the new size is at least as big as the specified minimum size.

public static Object
growArrayToAtMost(Object arr, int maxLen)

Method similar to growArrayBy50Pct, but it also ensures that the new size is no bigger than specific maximum size.

public static Integer
Integer(int i)

public static <T> Iterator<T>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_CHAR_ARRAYback to summary
pack-priv static final char[] EMPTY_CHAR_ARRAY
MAX_LONGback to summary
pack-priv static final Long MAX_LONG
NO_TYPEback to summary
pack-priv static final String NO_TYPE

Constructor Detail

DataUtilback to summary
private DataUtil()

Method Detail

anyValuesInCommonback to summary
public static <T> boolean anyValuesInCommon(Collection<T> c1, Collection<T> c2)

Method that can be used to efficiently check if 2 collections share at least one common element.

Returns:boolean

True if there is at least one element that's common to both Collections, ie. that is contained in both of them.

emptyIteratorback to summary
public static <T> Iterator<T> emptyIterator()
getEmptyCharArrayback to summary
public static char[] getEmptyCharArray()
growArrayByback to summary
public static String[] growArrayBy(String[] arr, int more)
growArrayByback to summary
public static int[] growArrayBy(int[] arr, int more)
growArrayBy50Pctback to summary
public static Object growArrayBy50Pct(Object arr)
growArrayToAtLeastback to summary
public static Object growArrayToAtLeast(Object arr, int minLen)

Method similar to growArrayBy50Pct, but it also ensures that the new size is at least as big as the specified minimum size.

growArrayToAtMostback to summary
public static Object growArrayToAtMost(Object arr, int maxLen)

Method similar to growArrayBy50Pct, but it also ensures that the new size is no bigger than specific maximum size.

Integerback to summary
public static Integer Integer(int i)
singletonIteratorback to summary
public static <T> Iterator<T> singletonIterator(T item)
com.ctc.wstx.util back to summary

private final Class DataUtil.EI

extends Object
implements Iterator<Object>
Class Inheritance
All Implemented Interfaces
java.util.Iterator

Field Summary

Modifier and TypeField and Description
public static final Iterator<?>

Constructor Summary

AccessConstructor and Description
private
EI()

Method Summary

Modifier and TypeMethod and Description
public static <T> Iterator<T>
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public Object
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sInstanceback to summary
public static final Iterator<?> sInstance

Constructor Detail

EIback to summary
private EI()

Method Detail

getInstanceback to summary
public static <T> Iterator<T> getInstance()
Annotations
@SuppressWarnings:unchecked
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public Object next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Object

the next element in the iteration

Annotations
@Override
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override