Újra kéne gondolni ezeket az objektumokat...
Mivel nincs destruktor, marad a kézimunka:
public class Label {
private String the_string;
Label (String str)
}
public class LabelContainer {
private TreeSet labelset;
addLabel(Label lb)
removeLabel(Label lb)
isUsed(Label lb)
}
public class A {
mylabel = new Label;
mylabelcontainer = new LabelContainer; //ez mehet feljebb is
mylabelcontainer.addLabel(mylabel)
mylabelcontainer.removeLabel(mylabel)
}
Szvsz a statikus változókat jobb ha hanyagolod
(webes bekuldes, a bekuldo gepe: caracas-1785.adsl.interware.hu)
|