@Override protected void setArray(Object array, int pos, Object value) { Array.setFloat(array,pos,((Float)value)); }
@Override protected void setArray(Object array, int pos, Object value) { Array.setFloat(array,pos,((Float)value)); }
Array.setLong(newObj, i, ((Number)n).longValue()); else if (arrT == float.class ) Array.setFloat(newObj, i, ((Number)n).floatValue()); else if (arrT == double.class ) Array.setDouble(newObj, i, ((Number)n).doubleValue());
Array.setFloat(array, index, ((Number) value).floatValue());
Array.setLong(newObj, i, ((Number)n).longValue()); else if (arrT == float.class ) Array.setFloat(newObj, i, ((Number)n).floatValue()); else if (arrT == double.class ) Array.setDouble(newObj, i, ((Number)n).doubleValue());
setLong(array, index, ((Long) value).longValue()); } else if (value instanceof Float) { setFloat(array, index, ((Float) value).floatValue()); } else if (value instanceof Double) { setDouble(array, index, ((Double) value).doubleValue());
for (Iterator iter = list.iterator(); iter.hasNext(); idx++) { Object element = iter.next(); Array.setFloat(array, idx, (Float) InvokerHelper.invokeStaticMethod(DefaultGroovyMethods.class, "asType", new Object[]{element, float.class}));
Array.setFloat(array, index, ((Number) value).floatValue());
Array.setLong(objArray, i, (Long) obj); } else if (obj instanceof Float) { Array.setFloat(objArray, i, (Float) obj); } else if (obj instanceof Character) { Array.setChar(objArray, i, (Character) obj);
@Override protected void setSingleValue(Object array, int index, Object value) { Array.setFloat(array, index, (Float) value); } },
@Override protected void setSingleValue(Object array, int index, Object value) { Array.setFloat(array, index, (Float) value); } },
@Override public void set(Object array, int index, Object object) { Array.setFloat(array, index, (Float) object); } },
@Override protected void setSingleValue(Object array, int index, Object value) { Array.setFloat(array, index, (Float) value); } },
@Override protected void setArray(Object array, int pos, Object value) { Array.setFloat(array,pos,((Float)value)); }
@Override protected void setArray(Object array, int pos, Object value) { Array.setFloat(array,pos,((Float)value)); }
public synchronized void set(int x, int y, float n) { ensureCapacity(x, y); // get the row Object row = Array.get(_matrix, x); if (row == null) { throw new ArrayIndexOutOfBoundsException("index out of bounds: " + x); } Array.setFloat(row, y, n); _rowCount = Math.max(x, _rowCount); _colCount = Math.max(y, _colCount); }
/** * Byte order reverses an <code>Array</code> of <code>floats</code> * * @param array input array */ private static void swapFloatArray(Object array) { int len = Array.getLength(array); float ftmp; int tmp; int b1, b2, b3, b4; for (int i = 0; i < len; i++) { ftmp = Array.getFloat(array, i); tmp = Float.floatToIntBits(ftmp); b1 = (tmp >> 0) & 0xff; b2 = (tmp >> 8) & 0xff; b3 = (tmp >> 16) & 0xff; b4 = (tmp >> 24) & 0xff; tmp = b1 << 24 | b2 << 16 | b3 << 8 | b4 << 0; ftmp = Float.intBitsToFloat(tmp); Array.setFloat(array, i, ftmp); } }
/** * @see org.apache.wicket.util.io.ClassStreamHandler.PrimitiveArray#readArray(WicketObjectInputStream) */ public Object readArray(WicketObjectInputStream dos) throws IOException { int length = dos.readInt(); Object array = Array.newInstance(getStreamClass(), length); for (int i = 0; i < length; i++) { Array.setFloat(array, i, dos.readFloat()); } return array; } }
/** * @see org.apache.wicket.util.io.ClassStreamHandler.PrimitiveArray#readArray(WicketObjectInputStream) */ @Override public Object readArray(WicketObjectInputStream dos) throws IOException { int length = dos.readInt(); Object array = Array.newInstance(getStreamClass(), length); for (int i = 0; i < length; i++) { Array.setFloat(array, i, dos.readFloat()); } return array; } }
public static void setArrayValue(Object array, Class<?> valueType, Object value, int index) { if (value == null) { return; } if (valueType == int.class) { Array.setInt(array, index, LdiIntegerConversionUtil.toPrimitiveInt(value)); } else if (valueType == double.class) { Array.setDouble(array, index, LdiDoubleConversionUtil.toPrimitiveDouble(value)); } else if (valueType == long.class) { Array.setLong(array, index, LdiLongConversionUtil.toPrimitiveLong(value)); } else if (valueType == float.class) { Array.setFloat(array, index, LdiFloatConversionUtil.toPrimitiveFloat(value)); } else if (valueType == short.class) { Array.setShort(array, index, LdiShortConversionUtil.toPrimitiveShort(value)); } else if (valueType == boolean.class) { Array.setBoolean(array, index, LdiBooleanConversionUtil.toPrimitiveBoolean(value)); } else if (valueType == char.class) { Array.setChar(array, index, ((Character) value).charValue()); } Array.set(array, index, value); }