org.fest.assertions
Class ArrayInspection

java.lang.Object
  extended by org.fest.assertions.ArrayInspection

public final class ArrayInspection
extends Object

Understands utility methods for arrays.

Since:
1.2
Author:
Alex Ruiz

Method Summary
static List<Object> copy(Object array)
          Copies the contents of the given array into a list.
static int sizeOf(Object array)
          Returns the size of the given array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

copy

public static List<Object> copy(Object array)
Copies the contents of the given array into a list.

Parameters:
array - the array to copy.
Returns:
a list containing the contents of the array.
Throws:
NullPointerException - if the given array is null.
IllegalArgumentException - if the given object is not an array.

sizeOf

public static int sizeOf(Object array)
Returns the size of the given array.

Parameters:
array - the array.
Returns:
the size of the given array.
Throws:
NullPointerException - if the given array is null.
IllegalArgumentException - if the given object is not an array.


Copyright © 2007-2010 FEST (Fixtures for Easy Software Testing). All Rights Reserved.