| 1336 | } |
| 1337 | |
| 1338 | @WarnBoxedMath(false) |
| 1339 | static public short[] short_array(int size, Object init){ |
| 1340 | short[] ret = new short[size]; |
| 1341 | if(init instanceof Short) |
| 1342 | { |
| 1343 | short s = (Short) init; |
| 1344 | for(int i = 0; i < ret.length; i++) |
| 1345 | ret[i] = s; |
| 1346 | } |
| 1347 | else |
| 1348 | { |
| 1349 | ISeq s = RT.seq(init); |
| 1350 | for(int i = 0; i < size && s != null; i++, s = s.next()) |
| 1351 | ret[i] = ((Number) s.first()).shortValue(); |
| 1352 | } |
| 1353 | return ret; |
| 1354 | } |
| 1355 | |
| 1356 | @WarnBoxedMath(false) |
| 1357 | static public short[] short_array(Object sizeOrSeq){ |