code: @SuppressWarnings("unchecked")
    public static <T> Iterable<T> iterableOf(final Object value) {
      if (value instanceof Iterable<?>) {
        return (Iterable<T>) value;
      }
      Class<?> valueClass = value.getClass();
      Preconditions.checkArgument(valueClass.isArray(), "not an array or Iterable: %s", valueClass);
      Class<?> subClass = valueClass.getComponentType();
      if (!subClass.isPrimitive()) {
        return Arrays.<T>asList((T[]) value);
      }
      return new Iterable<T>() {
  
        public Iterator<T> iterator() {
          return new Iterator<T>() {
  
            final int length = Array.getLength(value);
            int index = 0;
  
            public boolean hasNext() {
              return index < length;
            }
  
            public T next() {
              if (!hasNext()) {
                throw new NoSuchElementException();
              }
              return (T) Array.get(value, index++);
            }
  
            public void remove() {
              throw new UnsupportedOperationException();
            }
          };
        }
      };
    }
docs: Returns an iterable for an input iterable or array value.
  
  <p>If the input value extends {@link Iterable}, it will just return the input value. Otherwise,
  it will return an iterable that can handle arrays of primitive and non-primitive component
  type.
  
  @param value iterable (extends {@link Iterable}) or array value
  @return iterable