This method loop through array and use equals() method to search element. This actually performs a linear search over array in Java and return true if array has provided value.
public static <T> boolean contains(final T[] array, final T v)
{
for (final T e : array)
{
if (e == v || v != null && v.equals(e))
{
return true;
}
}
return false;
}