2004-11-11 | Paul Boddie | file changeset files shortlog | Added overriding tests to ValueSubclass, modifying Value. Added a test of dispatch to methods with identical names. |
paul@28 | 1 | public class DispatchTest { |
paul@28 | 2 | public int a; |
paul@28 | 3 | public float b; |
paul@28 | 4 | |
paul@28 | 5 | public DispatchTest() { |
paul@28 | 6 | this.a = 1; |
paul@28 | 7 | this.b = 2; |
paul@28 | 8 | } |
paul@28 | 9 | |
paul@28 | 10 | public DispatchTest(int a) { |
paul@28 | 11 | this.a = a; |
paul@28 | 12 | this.b = 2; |
paul@28 | 13 | } |
paul@28 | 14 | |
paul@28 | 15 | public DispatchTest(float b) { |
paul@28 | 16 | this.a = 1; |
paul@28 | 17 | this.b = b; |
paul@28 | 18 | } |
paul@28 | 19 | |
paul@28 | 20 | public DispatchTest(int a, float b) { |
paul@28 | 21 | this.a = a; |
paul@28 | 22 | this.b = b; |
paul@28 | 23 | } |
paul@28 | 24 | |
paul@28 | 25 | public void set(int a) { |
paul@28 | 26 | this.a = a; |
paul@28 | 27 | } |
paul@28 | 28 | |
paul@28 | 29 | public void set(float b) { |
paul@28 | 30 | this.b = b; |
paul@28 | 31 | } |
paul@28 | 32 | } |