Message from discussion
Subclassing using type parameters
Received: by 10.151.98.3 with SMTP id a3mr5073510ybm.33.1288335095204;
Thu, 28 Oct 2010 23:51:35 -0700 (PDT)
X-BeenThere: mirah@googlegroups.com
Received: by 10.150.1.11 with SMTP id 11ls1500267yba.0.p; Thu, 28 Oct 2010
23:51:34 -0700 (PDT)
Received: by 10.150.92.19 with SMTP id p19mr1004753ybb.44.1288335094930;
Thu, 28 Oct 2010 23:51:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.91.63.11 with SMTP id q11mr293168agk.45.1288334605783; Thu, 28
Oct 2010 23:43:25 -0700 (PDT)
Received: by 26g2000yqv.googlegroups.com with HTTP; Thu, 28 Oct 2010 23:43:25
-0700 (PDT)
Date: Thu, 28 Oct 2010 23:43:25 -0700 (PDT)
X-IP: 113.22.2.90
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12,gzip(gfe)
Message-ID: <9f8887d7-0e0e-444f-ba54-20e8d0b40986@26g2000yqv.googlegroups.com>
Subject: Subclassing using type parameters
From: Simon Hicks <simonhic...@gmail.com>
To: The Mirah Programming Language <mirah@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I'm trying to subclass an abstract class that requires type parameters
and I can't figure out the correct syntax for doing so in mirah. The
code I want to write would look something like this in Java
private class DownloadFilesTask extends AsyncTask<URL, Integer, Long>
{
protected Long doInBackground(URL url) {
long result = 0
//... do stuff here
return result;
}
}
The type parameters refer to the params, the type used for progress
reports and the final result. I can't find any code samples of people
trying to do something similar in mirah, and can't figure out what the
correct syntax for this is. For reference the AsyncTask class is
documented at http://developer.android.com/reference/android/os/AsyncTask.html
thanks,