public final class ArrayBuilders extends Object
Modifier and Type | Class and Description |
---|---|
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 and Description |
---|
ArrayBuilders() |
Modifier and Type | Method and Description |
---|---|
static <T> HashSet<T> |
arrayToSet(T[] elements) |
static Object |
getArrayComparator(Object defaultValue)
Helper method used for constructing simple value comparator used for
comparing arrays for content equality.
|
ArrayBuilders.BooleanBuilder |
getBooleanBuilder() |
ArrayBuilders.ByteBuilder |
getByteBuilder() |
ArrayBuilders.DoubleBuilder |
getDoubleBuilder() |
ArrayBuilders.FloatBuilder |
getFloatBuilder() |
ArrayBuilders.IntBuilder |
getIntBuilder() |
ArrayBuilders.LongBuilder |
getLongBuilder() |
ArrayBuilders.ShortBuilder |
getShortBuilder() |
static <T> T[] |
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.
|
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 Object getArrayComparator(Object defaultValue)
Note: current implementation is not optimized for speed; if performance ever becomes an issue, it is possible to construct much more efficient typed instances (one for Object[] and sub-types; one per primitive type).
Comparators
classpublic static <T> HashSet<T> arrayToSet(T[] elements)
public static <T> T[] insertInListNoDup(T[] array, T element)
Copyright © 2008–2018 FasterXML. All rights reserved.