void clearVariants(boolean expected, int start) {
   ArrayList<Variant> list = expected ? variants : unexpected;
   for (int i = start, len = list.size(); i < len; i++) {
     VARIANTS.recycle(list.get(i));
   }
   list.subList(start, list.size()).clear();
 }
 void clearVariants(boolean expected, int start) {
   MyList<Variant> list = expected ? variants : unexpected;
   if (start < 0 || start >= list.size()) return;
   for (int i = start, len = list.size(); i < len; i++) {
     VARIANTS.recycle(list.get(i));
   }
   list.setSize(start);
 }
Exemple #3
0
 public ByteBuffer getBuf() {
   synchronized (lock) {
     if (buf == null) {
       synchronized (ourBufferPool) {
         buf = ourBufferPool.alloc();
       }
     }
     return buf;
   }
 }
Exemple #4
0
  private void recycle() {
    if (buf != null) {
      synchronized (ourBufferPool) {
        ourBufferPool.recycle(buf);
      }
    }

    buf = null;
    read = false;
    dirty = false;
    myWriteMask = null;
  }
 public void clearVariants(boolean expected, int start) {
   MyList<Variant> list = expected ? variants : unexpected;
   if (start < 0 || start >= list.size()) return;
   for (int i = start, len = list.size(); i < len; i++) {
     VARIANTS.recycle(list.get(i));
   }
   list.setSize(start);
   if (expected) {
     lastExpectedVariantPos = -1;
     for (Variant variant : list) {
       if (lastExpectedVariantPos < variant.position) lastExpectedVariantPos = variant.position;
     }
   }
 }