Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class A {
- private B b;
- public int abc() {
- return b.abc(value1, value2, value3);
- }
- }
- class B {
- private C c;
- public int abc(int x, int y, int z) {
- return c.abc(x, y, z);
- }
- }
- class C {
- public int abc(int x, int y, int z) {
- // Do something with parameters x, y, z, e.g.:
- return x + y + z;
- }
- }
- class XYZParameterObject {
- private int x, y, z;
- public constructor(int x, int y, int z) {
- this.x = x;
- this.y = y;
- this.z = z;
- }
- public int abc() {
- return x + y + z;
- }
- }
- class A {
- private B b;
- public int abc() {
- return b.abc(new XYZParameterObject(value1, value2, value3));
- }
- }
- class B {
- private C c;
- public int abc(XYZParameterObject xyz) {
- return c.abc(xyz);
- }
- }
- class C {
- public int abc(XYZParameterObject xyz) {
- // Do something with parameters x, y, z, e.g.:
- return xyz.abc();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement