newbie: j2me & isWhiteSpace

O

Oliver Wong

I'm going to combine some of Darryl L. Pierce's replies into this one big
message.


Darryl L. Pierce said:
MIDP provides *all* of the java.lang wrapper classes, including Character.
However it does *not* provide all APIs from JavaSE. The right thing would
be to check the MIDP APIs, which excludes the isWhiteSpace() method...

You are right about the MIDP having the Character class. I had
downloaded the MIDP API and looked at the "All Classes" list on the left
frame, noticed that "Character" did not appear there, and so assumed that
the Character class was not present in the library. However, if I click on
the package "java.lang", Character does show up, but not as a link (implying
that it's not documented, I guess).

Darryl L. Pierce said:
Which you can't do since both licensing and implementations disallow
including java.lang.* classes in your code.

I'm not sure I understand what you're said here, but my understanding is
that the OP wants the functionality of the isWhitespace() method, and the
MIDP class library doesn't provide it, so I'm saying the OP should implement
that functionality himself, e.g.:

public class MyUtilityClass {
public static boolean naiveImplementationOfIsWhitespace(char c) {
return c = ' ';
}
}

I doubt that something like the above will put the OP in any legal
trouble.

- Oliver
 
D

Darryl L. Pierce

Oliver said:
I'm not sure I understand what you're said here,

My statement is clear: no classes that are packaged as java[x].* are
allowed to be included in a MIDlet suite. This restriction exists both
as a licensing element (read the license for the WTK, the MIDP RI, etc.)
and as an implementation detail (if you include such a class then all
MIDP implementations will fail the suite during verification).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top