G
Graeme
Hi, Would someone be able to help me here, I am missing the wood for
the trees!
I have an abstract class which I am initialising thus in the super
call:
/*Begin code snippet */
public abstract class AbstractHierarchyObject implements
HierarchyObject, Validate {
private String alias;
private String comment;
private String name;
private HierarchyObject parent;
private DataStorage dataStorage;
public AbstractHierarchyObject(String palias, String pname, String
pcomment,
HierarchyObject pparent, DataStorage pdataStorage) {
this.alias = palias;
this.comment = pcomment;
this.name = pname;
this.parent = pparent;
this.dataStorage = pdataStorage;
}
...
}
/*End code snippet */
When a valid instance of an object implementing the HierarchyObject
interface gets passed into the constructor in the pparent variable,
the this.parent line in the constructor always initialises the parent
to null.
What am I forgetting here about Abstract Classes?
Many thanks,
Graeme.
the trees!
I have an abstract class which I am initialising thus in the super
call:
/*Begin code snippet */
public abstract class AbstractHierarchyObject implements
HierarchyObject, Validate {
private String alias;
private String comment;
private String name;
private HierarchyObject parent;
private DataStorage dataStorage;
public AbstractHierarchyObject(String palias, String pname, String
pcomment,
HierarchyObject pparent, DataStorage pdataStorage) {
this.alias = palias;
this.comment = pcomment;
this.name = pname;
this.parent = pparent;
this.dataStorage = pdataStorage;
}
...
}
/*End code snippet */
When a valid instance of an object implementing the HierarchyObject
interface gets passed into the constructor in the pparent variable,
the this.parent line in the constructor always initialises the parent
to null.
What am I forgetting here about Abstract Classes?
Many thanks,
Graeme.