/** * Append a value. * * @param value the value to append */ public void add(int value) { if (size >= data.length) { ensureCapacity(size + size); } data[size++] = value; }
/** * Allocate a number of pages. * * @param list the list where to add the allocated pages * @param pagesToAllocate the number of pages to allocate * @param exclude the exclude list * @param after all allocated pages are higher than this page */ void allocatePages(IntArray list, int pagesToAllocate, BitField exclude, int after) { list.ensureCapacity(list.size() + pagesToAllocate); for (int i = 0; i < pagesToAllocate; i++) { int page = allocatePage(exclude, after); after = page; list.add(page); } }
/** * Append a value. * * @param value the value to append */ public void add(int value) { if (size >= data.length) { ensureCapacity(size + size); } data[size++] = value; }
/** * Append a value. * * @param value the value to append */ public void add(int value) { if (size >= data.length) { ensureCapacity(size + size); } data[size++] = value; }
/** * Allocate a number of pages. * * @param list the list where to add the allocated pages * @param pagesToAllocate the number of pages to allocate * @param exclude the exclude list * @param after all allocated pages are higher than this page */ void allocatePages(IntArray list, int pagesToAllocate, BitField exclude, int after) { list.ensureCapacity(list.size() + pagesToAllocate); for (int i = 0; i < pagesToAllocate; i++) { int page = allocatePage(exclude, after); after = page; list.add(page); } }
/** * Allocate a number of pages. * * @param list the list where to add the allocated pages * @param pagesToAllocate the number of pages to allocate * @param exclude the exclude list * @param after all allocated pages are higher than this page */ void allocatePages(IntArray list, int pagesToAllocate, BitField exclude, int after) { list.ensureCapacity(list.size() + pagesToAllocate); for (int i = 0; i < pagesToAllocate; i++) { int page = allocatePage(exclude, after); after = page; list.add(page); } }