public String getFeatureValueAsString(int addr, int feat) {
final TypeSystemImpl ts = this.svd.casMetadata.ts;
int typeCode = ts.range(feat);
if (typeCode == TypeSystemImpl.intTypeCode) {
return Integer.toString(this.ll_getIntValue(addr, feat));
} else if (typeCode == TypeSystemImpl.floatTypeCode) {
return Float.toString(this.ll_getFloatValue(addr, feat));
} else if (ts.subsumes(TypeSystemImpl.stringTypeCode, typeCode)) {
return this.getStringValue(addr, feat);
} else if (typeCode == TypeSystemImpl.booleanTypeCode) {
return Boolean.toString(this.getBooleanValue(addr, feat));
} else if (typeCode == TypeSystemImpl.byteTypeCode) {
return Byte.toString(this.getByteValue(addr, feat));
} else if (typeCode == TypeSystemImpl.shortTypeCode) {
return Short.toString(this.getShortValue(addr, feat));
} else if (typeCode == TypeSystemImpl.longTypeCode) {
return Long.toString(this.getLongValue(addr, feat));
} else if (typeCode == TypeSystemImpl.doubleTypeCode) {
return Double.toString(this.getDoubleValue(addr, feat));
} else {
CASRuntimeException e = new CASRuntimeException(CASRuntimeException.INAPPROP_RANGE,
new String[] { ts.ll_getFeatureForCode(feat).getName(),
ts.ll_getTypeForCode(typeCode).getName() });
throw e;
}
}