R
RFleming
Hello,
I have checked my Java In a nutshell, and Sun's documentation, and
either there is no answer, or more likely I am asking it wrong when.
I have a package Some Data.
A Class DataGroup1
A Method public ParseData getParseData
ParseData retValue = new ParseData(args,args....);
return retValue;
A Public Static InnerClass ParseData
A Method Public getParsedData
A Class DataGroup2 extends DataGroup1
A Method public ParseData getParseData
ParseData retValue = new ParseData(args,args....);
return retValue;
A Public Static InnerClass ParseData
A Method Public getParsedData
The problem I am getting is I cannot seem to overide the superclasses
method as DataGroup1.ParseData is a different return type than
DataGroup2.ParseData. Am I doint something impossible as it is layed
out above? I thought about making the inner class it's own separate
class in the package, but if I do I would prefer it was 'protected' to
be only viewable to classes in that package and do not know how to
accomplish that. I could also just make the inner class part of the
DataGroup Classes, but that would require some serious re-coding.
Any suggestions, or hints would be greatly appreciated!
Thanks
Ryan
I have checked my Java In a nutshell, and Sun's documentation, and
either there is no answer, or more likely I am asking it wrong when.
I have a package Some Data.
A Class DataGroup1
A Method public ParseData getParseData
ParseData retValue = new ParseData(args,args....);
return retValue;
A Public Static InnerClass ParseData
A Method Public getParsedData
A Class DataGroup2 extends DataGroup1
A Method public ParseData getParseData
ParseData retValue = new ParseData(args,args....);
return retValue;
A Public Static InnerClass ParseData
A Method Public getParsedData
The problem I am getting is I cannot seem to overide the superclasses
method as DataGroup1.ParseData is a different return type than
DataGroup2.ParseData. Am I doint something impossible as it is layed
out above? I thought about making the inner class it's own separate
class in the package, but if I do I would prefer it was 'protected' to
be only viewable to classes in that package and do not know how to
accomplish that. I could also just make the inner class part of the
DataGroup Classes, but that would require some serious re-coding.
Any suggestions, or hints would be greatly appreciated!
Thanks
Ryan