示例#1
0
 // Checks if item number already exists in the list
 public boolean check_item_duplicate(ArrayList items) {
   int size = items.size();
   for (int i = 0; i < size; i++) {
     Items temp2 = new Items();
     temp2 = (Items) items.get(i);
     if (temp2.get_item_number() == item_number) {
       return true;
     }
   }
   return false;
 }
  public int compare(Items i1, Items i2) {

    return i2.getNumberDownloads() - i1.getNumberDownloads();
  }