Java Collections.debug Examples

Java Collections.debug - 3 examples found. These are the top rated real world Java examples of java.util.Collections.debug extracted from open source projects. You can rate examples to help us improve the quality of examples.
Example #1
0
 public ListNode partition(ListNode head, int x) {
   ListNode headOfHead = new ListNode(-1);
   headOfHead.next = head;
   ListNode p = headOfHead;
   while (p.next != null) {
     p = p.next;
     // CUT begin
     debug(p.val);
     // CUT end
   }
   ListNode tail = new ListNode(-1);
   p.next = tail;
   p = headOfHead;
   ListNode q = tail;
   while (p.next != tail) {
     if (p.next.val < x) {
       p = p.next;
     } else {
       q.next = p.next;
       q = q.next;
       p.next = p.next.next;
       q.next = null;
     }
   }
   p.next = tail.next;
   return headOfHead.next;
 }
Example #2
0
 @Override
 public void go() {
   // TODO Auto-generated method stub
   debug(tank.getp(p));
   tank.g(time);
   res[id] = tank.getp(p).h;
   count++;
 }
Example #3
0
 boolean go(double ntime, Box box) {
   debug("go");
   g(ntime);
   for (int i = 0; i < bs.size() - 1; i++)
     if (bs.get(i) == box) {
       Box nb = box.h1 <= box.h2 ? bs.get(i - 1) : bs.get(i + 1);
       if (eq(nb.h, box.h)) {
         Box nbox = box.combine(nb);
         bs.remove(box);
         bs.add(i, nbox);
         bs.remove(nb);
       } else {
         nb.f += box.f;
         box.f = 0;
       }
       return true;
     }
   return false;
 }