The Artima Developer Community
Sponsored Link

Weblogs Forum
Will Raw Types in Java Ever be Banned?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Heinz Kabutz

Posts: 46
Nickname: drbean
Registered: May, 2003

Will Raw Types in Java Ever be Banned? (View in Weblogs)
Posted: Mar 15, 2006 9:41 AM
Reply to this message Reply
Summary
In the latest Java Specialists' Newsletter, we debate why you should write generics code such as class TaxPayer<P extends TaxPayer<P>>. Is it necessary, or would class TaxPayer<P extends TaxPayer> have been sufficient?
Advertisement

In the latest Java Specialists' Newsletter we look at how we can elegantly solve some problems of the Strategy Pattern using Java 5 Generics.

The Strategy Pattern is elegant in its simplicity. With this pattern, we should try to convert intrinsic state to extrinsic, to allow sharing of strategy objects. It gets tricky when each strategy object needs a different set of information in order to do its work. In this newsletter, we look at how we can use Java 5 Generics to pass the correct subtype of the context into each strategy object.

Please also have a look at the discussion on TheServerSide.com around these questions.

Topic: Teaching OO:  Putting the Object back into OOD Previous Topic   Next Topic Topic: Call-Out-The-Back


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us