I've taken up java for about a week and a half now with an eye toward writing cytoscape plugins and using jung2 to analyze and manipulate cytoscape graph objects. Is there any way to extend the cytoscape graph object call it class xyz to include a new field of the jung2 graph type object whose fields and methods point to the corresponding ones in cytoscape without creating a completely new object in memory. Not sure if I'm making and sense here but suppose for instance I had two class representing the same type of object
public class xyz {
public double i;
public xyz(double a) {
i=a;
}
}
public class pqr {
public double j;
public pqr(double b) {
j=b;
}
}
then something like
public class trans extends xyz {
public pqr toPqr;
public trans(double a) {
super(a);
toPqr = new pqr(i);
}
}
where now if
trans myTrans = new trans(5);
then myTrans.toPqr.j
points to myTrans.i
if I assign a new value to either then myTrans.i
changes
and if I change myTrans.i
then that is seen in myTrans.toPqr.j