Article View: borland.public.jbuilder.java.api
Article #1854Re: Help with Boolean.valueOf
From: Alex Colic
Date: Mon, 27 Aug 2001 16:38
Date: Mon, 27 Aug 2001 16:38
32 lines
1832 bytes
1832 bytes
Thanks
Alex
"Joi Ellis [TeamB]" <joi@aravox.com> wrote in message
news:3b865e84_2@dnews...
> Alex Colic <alex.colic@pop-ware.com> wrote:
> > Hi,
>
> > In one of my functions I get a string back, 'Yes' or 'No'. Then I have
to
> > set a boolean property using that String value. I have tried
> > Boolean.valueOf(theString).booleanValue but I always get false returned
to
> > me.
>
> > Is there a simpler way of doing this?
>
> Try passing back 'true' and 'false' instead of 'Yes' and 'No'.
>
> Or you can do something like
>
> String result = callYourMethodHere();
> boolean foo = result.equals("Yes") ? true : false;
>
>
> --
> Joi Ellis (TeamB) http://www.teamb.com/
> No direct email, please.
> For best results, post on news server newsgroups.borland.com!
> Newsgroup Guidelines: http://www.borland.com/newsgroups/guide.html
> Only posts which violate the rules in guide.html are subject to
cancelation.
Technical Details
Message-ID:
<3b8a77a0_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!feed2.onemain.com!feed1.onemain.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnewsReferences:
<3b865d98$1_2@dnews> <3b865e84_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,e516bf82fe973e53 X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2001-08-27 09:52:30 PST From: "Alex Colic" <alex.colic@pop-ware.com> Newsgroups: borland.public.jbuilder.java.api References: <3b865d98$1_2@dnews> <3b865e84_2@dnews> Subject: Re: Help with Boolean.valueOf Date: Mon, 27 Aug 2001 12:38:43 -0400 Lines: 34 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 24.150.29.218 Message-ID: <3b8a77a0_1@dnews> X-Trace: dnews 998930336 24.150.29.218 (27 Aug 2001 09:38:56 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!feed2.onemain.com!feed1.onemain.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews