| Modifier and Type | Class and Description |
|---|---|
| private static interface | |
| private static class | |
| private static class |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static CollectionHelper. | |
| public static <T> Set | |
| private static int | Returns: the initial capacity of the collectionthe expected size of the collection expectedSize)As the default loadFactor is of 0.75, we need to calculate the initial capacity from the expected size to avoid resizing the collection when we populate the collection with all the initial elements. |
| public static Iterable | Returns: anIterable providing iterators over the arraya given array object)Builds an |
| public static Iterator | Returns: anIterator iterating over the arraya given array object)Builds an |
| public static <T> ArrayList | |
| public static <T> ArrayList | |
| public static <T> ArrayList | |
| public static <K, V> ConcurrentHashMap | |
| public static <K, V> HashMap | |
| public static <K, V> HashMap | |
| public static <K, V> HashMap | |
| public static <T> HashSet | |
| public static <T> HashSet | |
| public static <T> HashSet | |
| public static <T> HashSet | |
| public static <T> LinkedHashSet | |
| public static <T> List | |
| public static <K, V> Map | |
| public static <T> Set |
| CollectionHelper | back to summary |
|---|---|
| private CollectionHelper() | |
| accessorFromArray | back to summary |
|---|---|
| private static CollectionHelper. | |
| asSet | back to summary |
|---|---|
public static <T> Set
| |
| getInitialCapacityFromExpectedSize | back to summary |
|---|---|
| private static int getInitialCapacityFromExpectedSize(int expectedSize) As the default loadFactor is of 0.75, we need to calculate the initial capacity from the expected size to avoid
resizing the collection when we populate the collection with all the initial elements. We use a calculation
similar to what is done in
| |
| iterableFromArray | back to summary |
|---|---|
| public static Iterable Builds an
| |
| iteratorFromArray | back to summary |
|---|---|
| public static Iterator Builds an
| |
| newArrayList | back to summary |
|---|---|
| public static <T> ArrayList | |
| newArrayList | back to summary |
|---|---|
| public static <T> ArrayList | |
| newArrayList | back to summary |
|---|---|
public static <T> ArrayList
| |
| newConcurrentHashMap | back to summary |
|---|---|
| public static <K, V> ConcurrentHashMap | |
| newHashMap | back to summary |
|---|---|
| public static <K, V> HashMap | |
| newHashMap | back to summary |
|---|---|
| public static <K, V> HashMap | |
| newHashMap | back to summary |
|---|---|
| public static <K, V> HashMap | |
| newHashSet | back to summary |
|---|---|
| public static <T> HashSet | |
| newHashSet | back to summary |
|---|---|
| public static <T> HashSet | |
| newHashSet | back to summary |
|---|---|
| public static <T> HashSet | |
| newHashSet | back to summary |
|---|---|
| public static <T> HashSet | |
| newLinkedHashSet | back to summary |
|---|---|
| public static <T> LinkedHashSet | |
| toImmutableList | back to summary |
|---|---|
| public static <T> List | |
| toImmutableMap | back to summary |
|---|---|
| public static <K, V> Map | |
| toImmutableSet | back to summary |
|---|---|
| public static <T> Set | |
| Modifier and Type | Field and Description |
|---|---|
| public static final CollectionHelper. | |
| public static final CollectionHelper. | |
| public static final CollectionHelper. | |
| public static final CollectionHelper. | |
| public static final CollectionHelper. | |
| public static final CollectionHelper. | |
| public static final CollectionHelper. | |
| public static final CollectionHelper. | |
| public static final CollectionHelper. |
| Modifier and Type | Method and Description |
|---|---|
| public T | |
| public int |
| BOOLEAN | back to summary |
|---|---|
| public static final CollectionHelper. | |
| BYTE | back to summary |
|---|---|
| public static final CollectionHelper. | |
| CHAR | back to summary |
|---|---|
| public static final CollectionHelper. | |
| DOUBLE | back to summary |
|---|---|
| public static final CollectionHelper. | |
| FLOAT | back to summary |
|---|---|
| public static final CollectionHelper. | |
| INT | back to summary |
|---|---|
| public static final CollectionHelper. | |
| LONG | back to summary |
|---|---|
| public static final CollectionHelper. | |
| OBJECT | back to summary |
|---|---|
| public static final CollectionHelper. | |
| SHORT | back to summary |
|---|---|
| public static final CollectionHelper. | |
| get | back to summary |
|---|---|
| public T get(A array, int index) | |
| size | back to summary |
|---|---|
| public int size(A array) | |
| Modifier and Type | Field and Description |
|---|---|
| private final CollectionHelper. | |
| private final A |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final Iterator |
| accessor | back to summary |
|---|---|
| private final CollectionHelper. | |
| values | back to summary |
|---|---|
| private final A values | |
| ArrayIterable | back to summary |
|---|---|
| public ArrayIterable(CollectionHelper. | |
| iterator | back to summary |
|---|---|
| public final Iterator Implements java. Doc from java. Returns an iterator over elements of type | |
| Modifier and Type | Field and Description |
|---|---|
| private final CollectionHelper. | |
| private int | |
| private final A |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public T |
| accessor | back to summary |
|---|---|
| private final CollectionHelper. | |
| current | back to summary |
|---|---|
| private int current | |
| values | back to summary |
|---|---|
| private final A values | |
| ArrayIterator | back to summary |
|---|---|
| public ArrayIterator(CollectionHelper. | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| next | back to summary |
|---|---|
| public T next() Implements java. Doc from java. Returns the next element in the iteration.
| |