Пример #1
0
 // A helper method to check if a given position is dirty or not.
 private boolean isDirty(ArrayList<Integer> dirty, int position) {
   for (int k = 0; k < dirty.size(); k += 2)
     if (position > dirty.get(k) && position < dirty.get(k + 1)) return true;
   return false;
 }