protected boolean checkElementIsExist(int[] newArray) {

    if (array.length != newArray.length) {
      return false;
    }
    for (int i = 0; i < array.length; i++) {
      int j = 0;
      for (; j < newArray.length; j++) {
        if (array[i] == newArray[j]) {
          break;
        }
      }
      if (j == newArray.length) {
        return false;
      }
    }
    return true;
  }