MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / concatArray

Method concatArray

ij/src/main/java/ij/macro/Functions.java:6445–6476  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6443 }
6444
6445 Variable[] concatArray() {
6446 interp.getLeftParen();
6447 ArrayList list = new ArrayList();
6448 int len = 0;
6449 do {
6450 if (isArrayArg()) {
6451 Variable[] a = getArray();
6452 for (int i=0; i<a.length; i++) {
6453 list.add((Variable)a[i].clone());
6454 len++;
6455 }
6456 } else if (isStringArg()) {
6457 Variable v = new Variable();
6458 v.setString(getString());
6459 list.add(v);
6460 len++;
6461 } else {
6462 Variable v = new Variable();
6463 v.setValue(interp.getExpression());
6464 list.add(v);
6465 len++;
6466 }
6467 interp.getToken();
6468 } while (interp.token==',');
6469 Variable[] a2 = new Variable[len];
6470 int index = 0;
6471 for (int i=0; i<list.size(); i++) {
6472 Variable v = (Variable)list.get(i);
6473 a2[index++] = v;
6474 }
6475 return a2;
6476 }
6477
6478 Variable[] sliceArray() {
6479 interp.getLeftParen();

Callers 1

doArrayMethod · 0.95

Calls 13

isArrayArgMethod · 0.95
getArrayMethod · 0.95
isStringArgMethod · 0.95
setStringMethod · 0.95
getStringMethod · 0.95
setValueMethod · 0.95
getLeftParenMethod · 0.80
getExpressionMethod · 0.80
addMethod · 0.65
cloneMethod · 0.65
getTokenMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected