Sets the label of the specified slice, where {@literal 1<=n<=nSlices}.
(String label, int n)
| 372 | |
| 373 | /** Sets the label of the specified slice, where {@literal 1<=n<=nSlices}. */ |
| 374 | public void setSliceLabel(String label, int n) { |
| 375 | if (n <= 0 || n > getSize()) |
| 376 | throw new IllegalArgumentException(outOfRange+n); |
| 377 | if (isTranslatingIndices()) |
| 378 | n = translate(n); |
| 379 | if (labels == null) |
| 380 | labels = new String[getSize()]; |
| 381 | expandArrays(getSize()); |
| 382 | labels[n-1] = label; |
| 383 | } |
| 384 | |
| 385 | /** Sets the array of slice labels. The array size must be the stack size or larger */ |
| 386 | protected void setSliceLabels(String[] labels) { |
no test coverage detected