@Test public void testContains() { assertTrue(Arrays.contains(new Character[] { 'v', 'o', 'j', 't', 'a' }, 'a')); assertFalse( Arrays.contains(new Character[] { 'j', 'a', 's', 'a' }, null)); assertTrue(Arrays.contains(new Character[] { 'l', null }, null)); }
public static boolean contains(Object[] array, Object object) { if (array == null) { return false; } for (final Object element : array) { if ((object != null && object.equals(element)) || (object == null && element == null)) { return true; } } return false; }
Arrays { public static boolean contains(Object[] array, Object object) { if (array == null) { return false; } for (final Object element : array) { if ((object != null && object.equals(element)) || (object == null && element == null)) { return true; } } return false; } }
Arrays { public static boolean contains(Object[] array, Object object) { if (array == null) { return false; } for (final Object element : array) { if ((object != null && object.equals(element)) || (object == null && element == null)) { return true; } } return false; }  }
Arrays { public static boolean contains(Object[] array, Object object) { if (array == null) { return false; } for (final Object element : array) { if ((object != null && object.equals(element)) || (object == null && element == null)) { return true; } } return false; }  static boolean contains(Object[] array, Object object); }
Arrays { public static boolean contains(Object[] array, Object object) { if (array == null) { return false; } for (final Object element : array) { if ((object != null && object.equals(element)) || (object == null && element == null)) { return true; } } return false; }  static boolean contains(Object[] array, Object object); static final Object[] EMPTY_OBJECT_ARRAY; }