• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Educate me on generics please...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Educate me on generics please...


  • Subject: Re: Educate me on generics please...
  • From: Daryl Lee <email@hidden>
  • Date: Wed, 6 Feb 2008 14:38:35 -0800

James,

Your example code example is fine and it's fully supported to create an EOQualifier this way. Since the qualifier format parser is quite flexible, I don't think any type mismatch issues can be caught at compile time.


On Feb 6, 2008, at 2:20 PM, James Cicenia wrote:

Hmmm,

And to think I learned that method of qualifier creation from either a book or Apples own docs years ago.

But mixing the objects in the List was confusing me, which is what Johann said about just using <Object>

-j-

On Feb 6, 2008, at 3:52 PM, Mr. Pierre Frisch wrote:

I completely disagree on this one. Your example is bad as it mixes different type of objects in the List. The point of generics is to catch type cast exception at compile time instead of run time. if you mix objects in the same array then it has no value but this is bad style anyway.

Pierre
--
Pierre Frisch
email@hidden


On Feb 6, 2008, at 12:37, Chuck Hill wrote:


On Feb 6, 2008, at 12:33 PM, James Cicenia wrote:

Well I have decided to to start going to 1.5 now.

this is something I do all the time:

NSMutableArray args2 = new NSMutableArray();
args2.addObject("portfolio");
args2.addObject(portfolio);
myQualifier2 = EOQualifier.qualifierWithQualifierFormat("%@ = %@", args2);

NSArray results = EOQualifier .filteredArrayWithQualifier(portfolioUserGroups(),myQualifier2);


How do I make that "generic Java 1.5" friendly?


From Art:

http://weblogs.java.net/blog/arnold/archive/2005/06/generics_consid_1.html
http://www.mindview.net/WebLog/log-0050

YMMV  :-)

Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Educate me on generics please... (From: James Cicenia <email@hidden>)
 >Re: Educate me on generics please... (From: Chuck Hill <email@hidden>)
 >Re: Educate me on generics please... (From: "Mr. Pierre Frisch" <email@hidden>)
 >Re: Educate me on generics please... (From: James Cicenia <email@hidden>)

  • Prev by Date: Re: Educate me on generics please...
  • Next by Date: Re: Educate me on generics please...
  • Previous by thread: Re: Educate me on generics please...
  • Next by thread: Re: Educate me on generics please...
  • Index(es):
    • Date
    • Thread