Esempio n. 1
0
 @Override
 public Point get(int i) {
   int offset = 0;
   for (Points points : pointsList) {
     if (i - offset < points.size()) {
       return points.get(i - offset);
     }
     offset += points.size();
   }
   throw new NoSuchElementException();
 }
Esempio n. 2
0
 @Override
 public int size() {
   int size = 0;
   for (Points points : pointsList) {
     size += points.size();
   }
   return size;
 }