| 1270 | } |
| 1271 | |
| 1272 | @WarnBoxedMath(false) |
| 1273 | static public int[] int_array(int size, Object init){ |
| 1274 | int[] ret = new int[size]; |
| 1275 | if(init instanceof Number) |
| 1276 | { |
| 1277 | int f = ((Number) init).intValue(); |
| 1278 | for(int i = 0; i < ret.length; i++) |
| 1279 | ret[i] = f; |
| 1280 | } |
| 1281 | else |
| 1282 | { |
| 1283 | ISeq s = RT.seq(init); |
| 1284 | for(int i = 0; i < size && s != null; i++, s = s.next()) |
| 1285 | ret[i] = ((Number) s.first()).intValue(); |
| 1286 | } |
| 1287 | return ret; |
| 1288 | } |
| 1289 | |
| 1290 | @WarnBoxedMath(false) |
| 1291 | static public int[] int_array(Object sizeOrSeq){ |