Пример #1
0
  static ReusableIF checkout() {
    if (head == null) {
      created++;
      return new Reusable();
    } else {
      held--;

      ReusableIF tmp = head;
      head = head.link;
      tmp.reset();
      return tmp;
    }
  }
Пример #2
0
 static void checkin(ReusableIF reusable) {
   held++;
   reusable.link = head;
   head = reusable;
 }