Or, if your char is a member of some object and you
were copying to that owning object Morph should handle
that Character->char conversion for you, IIRC...
-Matt
--- Matt Sgarlata
<Mat...@wh...> wrote:
> Hi Bruce, I'm glad to hear you're still using Morph
> :)
>
> Unfortunately there isn't really a way to directly
> return a char
> primitive with the Morph API because, as you point
> out, it returns a
> Character. This is more a limitation of the Java
> language than it is a
> limitation of Morph. What you can do is return a
> Character and then
> call Character.charValue() to change the Character
> wrapper object into a
> char primitive. Of course if you are using JDK 1.5,
> the JDK will handle
> this last step for you automatically :)
>
> Matt
>
> Bruce Lombardi wrote:
> >
> > I have a situation that requires converting from a
> char to a String
> > and then from a String to a char. I've written a
> converter that works
> > fine to do the first conversion, but I can't
> convert from a String to
> > a char because convertImpl must return an Object.
> I know that
> > conversion to primitive types (e.g., int) works
> for numeric
> > conversion, but I can't see how to get primitive
> types returned. Is
> > that possible?
> >
> >
> >
> > BTW, I see that you have submitted a proposal to
> become an Apache
> > project. Great move!
> >
> >
> >
> > -- Bruce
> >
> >
>
------------------------------------------------------------------------
> >
> >
>
-------------------------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc.
> > Still grepping through log files to find problems?
> Stop.
> > Now Search log events and configuration files
> using AJAX and a browser.
> > Download your FREE copy of Splunk now >>
> http://get.splunk.com/
> >
>
------------------------------------------------------------------------
> >
> > _______________________________________________
> > morph-user mailing list
> > mor...@li...
> >
>
https://lists.sourceforge.net/lists/listinfo/morph-user
> >
>
> >
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?
> Stop.
> Now Search log events and configuration files using
> AJAX and a browser.
> Download your FREE copy of Splunk now >>
http://get.splunk.com/>
_______________________________________________
> morph-user mailing list
> mor...@li...
>
https://lists.sourceforge.net/lists/listinfo/morph-user
>
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
|