|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.fasterxml.jackson.databind.util.ArrayBuilders
public final class ArrayBuilders
Helper class that contains set of distinct builders for different arrays of primitive values. It also provides trivially simple reuse scheme, which assumes that caller knows not to use instances concurrently (which works ok with primitive arrays since they can not contain other non-primitive types).
Nested Class Summary | |
---|---|
static class |
ArrayBuilders.BooleanBuilder
|
static class |
ArrayBuilders.ByteBuilder
|
static class |
ArrayBuilders.DoubleBuilder
|
static class |
ArrayBuilders.FloatBuilder
|
static class |
ArrayBuilders.IntBuilder
|
static class |
ArrayBuilders.LongBuilder
|
static class |
ArrayBuilders.ShortBuilder
|
Constructor Summary | |
---|---|
ArrayBuilders()
|
Method Summary | ||
---|---|---|
static
|
addToList(List<T> list,
T element)
Helper method for adding specified element to a List, but also considering case where the List may not have been yet constructed (that is, null is passed instead). |
|
static
|
arrayAsIterable(T[] array)
|
|
static
|
arrayAsIterator(T[] array)
Helper method for exposing contents of arrays using a read-only iterator |
|
static
|
arrayToList(T[] elements)
|
|
static
|
arrayToSet(T[] elements)
|
|
ArrayBuilders.BooleanBuilder |
getBooleanBuilder()
|
|
ArrayBuilders.ByteBuilder |
getByteBuilder()
|
|
ArrayBuilders.DoubleBuilder |
getDoubleBuilder()
|
|
ArrayBuilders.FloatBuilder |
getFloatBuilder()
|
|
ArrayBuilders.IntBuilder |
getIntBuilder()
|
|
ArrayBuilders.LongBuilder |
getLongBuilder()
|
|
ArrayBuilders.ShortBuilder |
getShortBuilder()
|
|
static
|
insertInList(T[] array,
T element)
Helper method for constructing a new array that contains specified element followed by contents of the given array. |
|
static
|
insertInListNoDup(T[] array,
T element)
Helper method for constructing a new array that contains specified element followed by contents of the given array but never contains duplicates. |
|
static
|
setAndArray(Set<T> set,
T[] elements)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArrayBuilders()
Method Detail |
---|
public ArrayBuilders.BooleanBuilder getBooleanBuilder()
public ArrayBuilders.ByteBuilder getByteBuilder()
public ArrayBuilders.ShortBuilder getShortBuilder()
public ArrayBuilders.IntBuilder getIntBuilder()
public ArrayBuilders.LongBuilder getLongBuilder()
public ArrayBuilders.FloatBuilder getFloatBuilder()
public ArrayBuilders.DoubleBuilder getDoubleBuilder()
public static <T> HashSet<T> arrayToSet(T[] elements)
public static <T> ArrayList<T> arrayToList(T[] elements)
public static <T> HashSet<T> setAndArray(Set<T> set, T[] elements)
public static <T> List<T> addToList(List<T> list, T element)
list
- List to add to; may be null to indicate that a new
List is to be constructedelement
- Element to add to list
list
(if it was not null), or a newly constructed List.public static <T> T[] insertInList(T[] array, T element)
public static <T> T[] insertInListNoDup(T[] array, T element)
public static <T> Iterator<T> arrayAsIterator(T[] array)
public static <T> Iterable<T> arrayAsIterable(T[] array)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |