public class IterableLike extends Object
| Constructor and Description |
|---|
IterableLike() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isEmpty(Object obj)
Attempt to determine if a iterable-like is empty, preferably without iterating.
|
static boolean |
isIterable(Object maybeIterable) |
static Iterator<Object> |
of(Object iterable)
Given an iterable object (which may be a iterator, iterable, primitive
or reference array), return an iterator over its (possibly boxed) elements.
|
static List<Object> |
toList(Object iterable)
Collect an iterable-like into a newly allocated ArrayList.
|
public static boolean isEmpty(Object obj)
obj - the iterable-like to check for emptinesspublic static boolean isIterable(Object maybeIterable)
IterableLike can iterate over the given objectpublic static Iterator<Object> of(Object iterable)
Copyright © 2017. All rights reserved.