| 666 | } |
| 667 | |
| 668 | public class PassShift implements Perform { |
| 669 | private final Perform child; |
| 670 | private int shift; |
| 671 | |
| 672 | public PassShift(int shift, Perform child) { |
| 673 | this.shift = shift; |
| 674 | this.child = child; |
| 675 | } |
| 676 | |
| 677 | @Override |
| 678 | public boolean perform(int pass) { |
| 679 | return child.perform(-pass + shift); |
| 680 | } |
| 681 | |
| 682 | @Override |
| 683 | public int[] getPasses() { |
| 684 | int[] p = child.getPasses(); |
| 685 | int[] p2 = new int[p.length]; |
| 686 | for (int i = 0; i < p.length; i++) |
| 687 | p2[i] = p[i] + shift; |
| 688 | return p2; |
| 689 | } |
| 690 | |
| 691 | @Override |
| 692 | public String toString() { |
| 693 | return "<i>shift" + shift + "</i>:" + child; |
| 694 | } |
| 695 | } |
| 696 | |
| 697 | } |
nothing calls this directly
no outgoing calls
no test coverage detected