M
mike
Hi,
We are working with a protocol that can have one/more object/-s of the
same type within that object.
Normally we have:
public class MyObject{
private String name = null;
private String value = null;
public MyObject(String name,String value){
}
//getters/ setters for name and value.
}
Now each of these objects can contain one/ more objects of type
MyObject.
How can I implement this?
Shall I add a new constructor with:
public MyObject(String name,String value, ArrayList<MyObjects> objects)
{
}
All suggestions welcome.
cheers,
//mike
We are working with a protocol that can have one/more object/-s of the
same type within that object.
Normally we have:
public class MyObject{
private String name = null;
private String value = null;
public MyObject(String name,String value){
}
//getters/ setters for name and value.
}
Now each of these objects can contain one/ more objects of type
MyObject.
How can I implement this?
Shall I add a new constructor with:
public MyObject(String name,String value, ArrayList<MyObjects> objects)
{
}
All suggestions welcome.
cheers,
//mike