Java Array Has inArray(byte needle, byte[] haystack)

Here you can find the source of inArray(byte needle, byte[] haystack)

Description

in Array

License

Open Source License

Declaration

public static boolean inArray(byte needle, byte[] haystack) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static boolean inArray(byte needle, byte[] haystack) {
        for (byte item : haystack) {
            if (item == needle) {
                return true;
            }//from w w  w  . j  av  a  2  s  .  c  o  m
        }
        return false;
    }
}

Related

  1. arrayHas(int[] arr, int val)
  2. arrayHasContent(Object[] array)
  3. arrayHasContiguousRowEntries(double[] aVector)
  4. arrayHasElements(Object[] obj)
  5. arrayHasTaints(int[] a)
  6. inArray(byte needle, byte[] haystack)
  7. inArray(char[] array, char c)
  8. inArray(final String s, final String[] array)
  9. inArray(final T[] array, final U search)