Help | Site Map
Connecting Tech Pros Worldwide
Reply
 
LinkBack Thread Tools
  #1  
Old October 7th, 2008, 04:45 PM
Newbie
 
Join Date: Sep 2008
Posts: 7
Default Templates problem

Hi,

if there is:
Expand|Select|Wrap|Line Numbers
  1. public class Range<T extends Comparable<T>> extends Scope<T> implements Cloneable
, can I define this one:
Expand|Select|Wrap|Line Numbers
  1. public class RangeList<T extends Comparable<T>, R extends Range<T>> extends ArrayList<R>
without giving "T extends Comparable<T>"?

It would be perfect to say:
Expand|Select|Wrap|Line Numbers
  1. RangeList<R extends Range<T extends Comparable<T>>>
:).

Thanks in advance,
Etam.
Reply
  #2  
Old October 7th, 2008, 04:53 PM
Newbie
 
Join Date: Sep 2008
Posts: 7
Default

Maybe it is not related but RangeList<Date, Timerange> duties, has:
Expand|Select|Wrap|Line Numbers
  1. public final void crop(List<Range<T>> ranges)
method, and I can't pass List<Timerange> there (Timerange extends Range<Date> :/.

I have to do this:
Expand|Select|Wrap|Line Numbers
  1. List<Timerange> list = dateType.filter(starts, ends);
  2. List<Range<Date>> l = new ArrayList<Range<Date>>();
  3. Collections.copy(l, list);
  4. duties.crop(l);
Reply
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles