/** * Removes the value at <tt>offset</tt> from the list. * * @param offset an <code>int</code> value * @return the value previously stored at offset. */ public long remove(int offset) { long old = get(offset); remove(offset, 1); return old; }
protected void testBitInSkip(int offset, BitIn bi) throws IOException { bi.skipBits(initial_bitoffset); bi.skipBytes(byteOffsets.get(offset)); bi.skipBits(bitOffsets.get(offset)); for(int index=offset;index<IDS.length;index++) { int[] ids = IDS[index]; assertEquals(byteOffsets.get(index), bi.getByteOffset()); assertEquals(bitOffsets.get(index), bi.getBitOffset()); int id=-1; for (int i : ids) { id = bi.readDelta() + id; assertEquals(i, id); } } }
protected void testBitInSkip(int offset, BitIn bi) throws IOException { bi.skipBits(initial_bitoffset); bi.skipBytes(byteOffsets.get(offset)); bi.skipBits(bitOffsets.get(offset)); for(int index=offset;index<IDS.length;index++) { int[] ids = IDS[index]; assertEquals(byteOffsets.get(index), bi.getByteOffset()); assertEquals(bitOffsets.get(index), bi.getBitOffset()); int id=-1; for (int i : ids) { id = bi.readGamma() + id; assertEquals(i, id); } } }
protected void testBitInSkip(int offset, BitIn bi) throws IOException { bi.skipBits(initial_bitoffset); bi.skipBytes(byteOffsets.get(offset)); bi.skipBits(bitOffsets.get(offset)); for(int index=offset;index<IDS.length;index++) { int[] ids = IDS[index]; assertEquals(byteOffsets.get(index), bi.getByteOffset()); assertEquals(bitOffsets.get(index), bi.getBitOffset()); int id=-1; for (int i : ids) { id = bi.readGolomb(b) + id; assertEquals(i, id); } } }
protected void testBitIn(BitIn bi) throws IOException { int index = 0; bi.skipBits(initial_bitoffset); for(int[] ids : IDS) { assertEquals(byteOffsets.get(index), bi.getByteOffset()); assertEquals(bitOffsets.get(index), bi.getBitOffset()); int id=-1; for (int i : ids) { id = bi.readDelta() + id; assertEquals(i, id); } index++; } }
protected void testBitIn(BitIn bi) throws IOException { int index = 0; bi.skipBits(initial_bitoffset); for(int[] ids : IDS) { assertEquals(byteOffsets.get(index), bi.getByteOffset()); assertEquals(bitOffsets.get(index), bi.getBitOffset()); int id=-1; for (int i : ids) { id = bi.readGamma() + id; assertEquals(i, id); } index++; } }
protected void testBitIn(BitIn bi) throws IOException { int index = 0; bi.skipBits(initial_bitoffset); for(int[] ids : IDS) { assertEquals(byteOffsets.get(index), bi.getByteOffset()); assertEquals(bitOffsets.get(index), bi.getBitOffset()); int id=-1; for (int i : ids) { id = bi.readGolomb(b) + id; assertEquals(i, id); } index++; } }