3 import java.util.ArrayList;
5 public class TestClass implements TestClassInterface {
12 private String stringC;
13 private List<CallBackInterfaceWithCallBack> cblist;
23 cblist = new ArrayList<CallBackInterfaceWithCallBack>();
27 public TestClass(int _int, float _float, String _string) {
32 cblist = new ArrayList<CallBackInterfaceWithCallBack>();
37 //public void registerCallback(CallBackInterface _cb) {
38 public void registerCallback(CallBackInterfaceWithCallBack _cb) {
41 System.out.println("Registering callback object!");
45 public void registerCallbackArray(CallBackInterfaceWithCallBack _cb[]) {
47 for (CallBackInterfaceWithCallBack cb : _cb) {
49 System.out.println("Registering callback objects in array!");
54 public void registerCallbackList(List<CallBackInterfaceWithCallBack> _cb) {
56 for (CallBackInterfaceWithCallBack cb : _cb) {
58 System.out.println("Registering callback objects in list!");
63 public int callBack() {
66 for (CallBackInterfaceWithCallBack cb : cblist) {
67 sum = sum + cb.printInt();
74 public byte getByte(byte in) {
80 public short getShort(short in) {
86 public long getLong(long in) {
92 public float getFloat(float in) {
98 public double getDouble(double in) {
104 public boolean getBoolean(boolean in) {
110 public char getChar(char in) {
117 public byte[] getByteArray(byte[] in) {
123 public short[] getShortArray(short[] in) {
129 public long[] getLongArray(long[] in) {
135 public float[] getFloatArray(float[] in) {
141 public double[] getDoubleArray(double[] in) {
147 public boolean[] getBooleanArray(boolean[] in) {
153 public char[] getCharArray(char[] in) {
160 public List<Byte> getByteList(List<Byte> in) {
166 public List<Short> getShortList(List<Short> in) {
172 public List<Long> getLongList(List<Long> in) {
178 public List<Float> getFloatList(List<Float> in) {
184 public List<Double> getDoubleList(List<Double> in) {
190 public List<Boolean> getBooleanList(List<Boolean> in) {
196 public List<Character> getCharList(List<Character> in) {
209 public void setA(int _int) {
215 public void setB(float _float) {
221 public void setC(String _string) {
228 public Enum handleEnum(Enum en) {
230 System.out.println("Enum: " + en);
236 public Enum[] handleEnumArray(Enum[] en) {
239 System.out.println("Enum: " + e);
246 public List<Enum> handleEnumList(List<Enum> en) {
249 System.out.println("Enum: " + e);
257 public Struct handleStruct(Struct str) {
259 System.out.println("Name: " + str.name);
260 System.out.println("Value: " + str.value);
261 System.out.println("Year: " + str.year);
264 Struct test = new Struct();
265 test.name = "Anonymous";
275 public Struct[] handleStructArray(Struct str[]) {
277 for (Struct st : str) {
278 System.out.println("Name: " + st.name);
279 System.out.println("Value: " + st.value);
280 System.out.println("Year: " + st.year);
283 Struct test = new Struct();
284 test.name = "Anonymous";
294 public List<Struct> handleStructList(List<Struct> str) {
296 for (Struct st : str) {
297 System.out.println("Name: " + st.name);
298 System.out.println("Value: " + st.value);
299 System.out.println("Year: " + st.year);
302 Struct test = new Struct();
314 public String sumArray(String[] newA) {
317 for (String i : newA)
323 public int setAndGetA(int newA) {
330 public int setACAndGetA(String newC, int newA) {