@Override public final int ll_getRefArrayValue(int fsRef, int position) { final int pos = getArrayStartAddress(fsRef) + position; return this.getHeap().heap[pos]; }
@Override public final int ll_getIntArrayValue(int fsRef, int position) { final int pos = getArrayStartAddress(fsRef) + position; return this.getHeap().heap[pos]; }
/** * @see org.apache.uima.cas.IntArrayFS#copyToArray(int, int[], int, int) */ public void copyToArray(int srcOffset, int[] dest, int destOffset, int length) { casImpl.checkArrayBounds(addr, srcOffset, length); srcOffset += this.casImpl.getArrayStartAddress(this.addr); System.arraycopy(this.casImpl.getHeap().heap, srcOffset, dest, destOffset, length); }
/** * @see org.apache.uima.cas.IntArrayFS#copyFromArray(int[], int, int, int) */ public void copyFromArray(int[] src, int srcOffset, int destOffset, int length) { casImpl.checkArrayBounds(addr, destOffset, length); destOffset += this.casImpl.getArrayStartAddress(this.addr); System.arraycopy(src, srcOffset, this.casImpl.getHeap().heap, destOffset, length); }
@Override public final float ll_getFloatArrayValue(int fsRef, int position) { final int pos = getArrayStartAddress(fsRef) + position; return int2float(this.getHeap().heap[pos]); }
@Override public final String ll_getStringArrayValue(int fsRef, int position) { final int pos = getArrayStartAddress(fsRef) + position; return getStringForCode(this.getHeap().heap[pos]); }
@Override public void ll_setIntArrayValue(int fsRef, int position, int value) { final int pos = getArrayStartAddress(fsRef) + position; this.getHeap().heap[pos] = value; if (this.svd.trackingMark != null) { this.logFSUpdate(fsRef, pos, ModifiedHeap.FSHEAP, 1); } }
/** * @see org.apache.uima.cas.ShortArrayFS#copyToArray(int, String[], int, int) */ public void copyToArray(int srcOffset, String[] dest, int destOffset, int length) { casImpl.checkArrayBounds(addr, srcOffset, length); srcOffset += casImpl.getHeap().heap[casImpl.getArrayStartAddress(addr)]; final short[] heap = this.casImpl.getShortHeap().heap; for (int i = 0; i < length; i++) { dest[i + destOffset] = Short.toString(heap[i + srcOffset]); } }
@Override public double ll_getDoubleArrayValue(int fsRef, int position) { final int pos = this.getHeap().heap[getArrayStartAddress(fsRef)]; long val = this.getLongHeap().getHeapValue(pos + position); return Double.longBitsToDouble(val); }
/** * @see org.apache.uima.cas.CommonArrayFS#copyToArray(int, String[], int, int) */ public void copyToArray(int srcOffset, String[] dest, int destOffset, int length) { casImpl.checkArrayBounds(addr, srcOffset, length); final int startOffset = srcOffset + casImpl.getHeap().heap[casImpl.getArrayStartAddress(addr)]; final byte[] heap = this.casImpl.getByteHeap().heap; for (int i = 0; i < length; i++) { dest[i + destOffset] = Byte.toString(heap[i + startOffset]); } }
/** * @see org.apache.uima.cas.CommonArrayFS#copyFromArray(String[], int, int, int) */ public void copyFromArray(String[] src, int srcOffset, int destOffset, int length) { this.casImpl.checkArrayBounds(this.addr, destOffset, length); final int startOffset = destOffset + casImpl.getHeap().heap[casImpl.getArrayStartAddress(this.addr)]; byte[] heap = this.casImpl.getByteHeap().heap; for (int i = 0; i < length; i++) { heap[i + startOffset] = Byte.parseByte(src[i + srcOffset]); } } }
/** * @see org.apache.uima.cas.FloatArrayFS#copyFromArray(float[], int, int, int) */ public void copyFromArray(float[] src, int srcOffset, int destOffset, int length) { casImpl.checkArrayBounds(addr, destOffset, length); final int[] heap = this.casImpl.getHeap().heap; destOffset += this.casImpl.getArrayStartAddress(this.addr); for (int i = 0; i < length; i++) { heap[i + destOffset] = CASImpl.float2int(src[i + srcOffset]); } }
@Override public long ll_getLongArrayValue(int fsRef, int position) { final int pos = this.getHeap().heap[getArrayStartAddress(fsRef)]; return this.getLongHeap().getHeapValue(pos + position); }
@Override public void ll_setDoubleArrayValue(int fsRef, int position, double d) { final int offset = this.getHeap().heap[getArrayStartAddress(fsRef)]; long value = Double.doubleToLongBits(d); this.getLongHeap().setHeapValue(value, offset + position); if (this.svd.trackingMark != null) { this.logFSUpdate(fsRef, offset+position, ModifiedHeap.LONGHEAP, 1); } }
@Override public byte ll_getByteArrayValue(int fsRef, int position) { final int pos = this.getHeap().heap[getArrayStartAddress(fsRef)]; return this.getByteHeap().getHeapValue(pos + position); }
@Override public short ll_getShortArrayValue(int fsRef, int position) { final int pos = this.getHeap().heap[getArrayStartAddress(fsRef)]; return this.getShortHeap().getHeapValue(pos + position); }
/** * @see org.apache.uima.cas.FloatArrayFS#copyToArray(int, float[], int, int) */ public void copyToArray(int srcOffset, float[] dest, int destOffset, int length) { casImpl.checkArrayBounds(addr, srcOffset, length); final int[] heap = this.casImpl.getHeap().heap; srcOffset += this.casImpl.getArrayStartAddress(this.addr); for (int i = 0; i < length; i++) { dest[i + destOffset] = CASImpl.int2float(heap[i + srcOffset]); } }
@Override public void ll_setFloatArrayValue(int fsRef, int position, float value) { final int pos = getArrayStartAddress(fsRef) + position; this.getHeap().heap[pos] = float2int(value); if (this.svd.trackingMark != null) { this.logFSUpdate(fsRef, pos,ModifiedHeap.FSHEAP, 1); } }
@Override public void ll_setStringArrayValue(int fsRef, int position, String value) { final int pos = getArrayStartAddress(fsRef) + position; final int stringCode = (value == null) ? NULL : addString(value); this.getHeap().heap[pos] = stringCode; if (this.svd.trackingMark != null) { this.logFSUpdate(fsRef, pos, ModifiedHeap.FSHEAP, 1); } }
@Override public void ll_setByteArrayValue(int fsRef, int position, byte value) { final int offset = this.getHeap().heap[getArrayStartAddress(fsRef)]; this.getByteHeap().setHeapValue(value, offset + position); if (this.svd.trackingMark != null) { this.logFSUpdate(fsRef, offset+position, ModifiedHeap.BYTEHEAP, 1); } }