Ultimately, I want to get the thumb of this Image and convert it to a URL.
I want to be able to do this efficiently and use something like the
following syntax.
myImage.getThumb().toURL()
Is this possible?
Yes, but getThumb() must return a subclass of SuperOne.
---
Michael Wentzel
No.
The way you are doing means you are calling .toURL() method on what ever is
returned by the method getThumb(). Unless getThumb returns a type of Object of
type SuperOne or it's sub-class you cannot call this method and you should see a
compile time error.
What
you can do is
URL
url
}
-ryan
- Original Message -
From: "Michael Wentzel" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, March 22, 2001 8:32 AM
Subject: RE: Java Question on Inheritance
Ultimately, I want to get the thumb of this Image and convert it to a
URL.
I want to be able to
Then this is my next problem.
I currently have getThumb() returning an Image object.
The part where I am stuck at is what to do in the toURL() method.
my mock getThumb() method currently looks something like
public Image getThumb(){
this.iValue = "/home/thumbs";
return this;
}
Ryan wrote:
Then this is my next problem.
I currently have getThumb() returning an Image object.
The part where I am stuck at is what to do in the toURL() method.
my mock getThumb() method currently looks something like
public Image getThumb(){
this.iValue = "/home/thumbs";