Reverting type resolution in C++ to Java types, e.g. byte and char instead of just...
[iot2.git] / iotjava / iotrmi / Java / basics / TestClass.java
1 import java.util.Set;
2 import java.util.List;
3 import java.util.ArrayList;
4
5 public class TestClass implements TestClassInterface {
6
7         /**
8          * Class Properties
9          */
10         private int intA;
11         private float floatB;
12         private String stringC;
13
14         /**
15          * Constructors
16          */
17         public TestClass() {
18
19                 intA = 1;
20                 floatB = 2;
21                 stringC = "345";
22         }
23
24
25         public TestClass(int _int, float _float, String _string) {
26
27                 intA = _int;
28                 floatB = _float;
29                 stringC = _string;
30         }
31
32
33         public byte getByte(byte in) {
34
35                 return in;
36         }
37
38
39         public short getShort(short in) {
40
41                 return in;
42         }
43
44
45         public long getLong(long in) {
46
47                 return in;
48         }
49
50
51         public float getFloat(float in) {
52
53                 return in;
54         }
55
56
57         public double getDouble(double in) {
58
59                 return in;
60         }
61
62
63         public boolean getBoolean(boolean in) {
64
65                 return in;
66         }
67
68
69         public char getChar(char in) {
70
71                 return in;
72         }
73
74
75         public int getA() {
76
77                 return intA;
78         }
79
80
81         public void setA(int _int) {
82
83                 intA = _int;
84         }
85
86
87         public void setB(float _float) {
88
89                 floatB = _float;
90         }
91
92
93         public void setC(String _string) {
94
95                 stringC = _string;
96         }
97
98
99         // Getters
100         public String sumArray(String[] newA) {
101
102                 String sum = "";
103                 for (String i : newA) 
104                         sum = sum + i;
105                 return sum;
106         }
107
108
109         public int setAndGetA(int newA) {
110
111                 intA = newA;
112                 return intA;
113         }
114
115
116         public int setACAndGetA(String newC, int newA) {
117
118                 stringC = newC;
119                 intA = newA;
120                 return intA;
121         }
122 }