LongHashtable or LongHashtableCollection?

Is there a major difference between these two classes? When one be used rather than another?

Ah, I see, my fault, sorry

I have against them in javadocs, they seem identical.

Tags: BlackBerry Developers

Similar Questions

  • Of BrowserFieldCookieManager cookie

    Hi all

    I'm running on a Torch 9800 OS 6.0.0 Simulator.  I had a problem with tent to access a cookie via the BrowserFieldCookieManager interface.  I have a code like below:

    BrowserField b...

    String cookie;

    BrowserFieldCookieManager 10 yr = b.getCookieManager ();

    cookie = bfcm.getCookie (MYSITEURL);

    When I run this code block my 'cookie' string is set to null by the getCookie method.  I traced inside the 10 yr with the debugger object.  Strange thing is that my cookie is actually there, inside the LongHashtable which is part of 10 yr.  The cookie looks good, but the hash that is generated for the key seems far away.

    The so-called getCookie method takes a string of the URL associated with the cookie.  I guess that the method performs a hash of standard java on this channel.  However, I see the following values:

    Expected MYSITEURL hash value = 1544736662

    Real hash of the cookie code: = 953310182818140326

    So obviously I'm not the cookie.  Any reason why the hash code for my cookie would be so far out of the expected hash code?  I have of course no way of the cookie with the hash being off.  Anyone have agreements with this issue or know a sort of solution?

    Found the cause.  A protocol listener revealed that caused javascript the browser to submit a completely new application.  This annex request the original using a jsession cookie GET request.  Then, the browser makes a new HTTP request in the form:

    MYSITEURL + jsessionid = xxxxxxx

    This caused the hash of the cookie to be stored under this new URL as opposed to my original URL request.  For those facing a similar problem, see ProtocolController class and override the handleNavigationRequest method to see the new URL is presented at the end of the execution of javascript.

  • SQLite, Hashtable, or other Options?

    Hello. I'm relatively new to BB dev.  You are looking for the most effective way to store and query data very simply.  A column of date and an account.  For example.

    2012-10-01, 5

    2012-10, 02, 1

    Must be able to determine the sum of the number of months from 10 to 2012 for example.  Would rather not use SQLite, would perhaps create a hash table in a persistent storage.  Just worried about the configuration required to do things like get the number of months, etc.  Seems that should be a string, analysis, loopoing, etc to get this info if in hashtable.

    What would you recommend as the best approach?  Are there other options that maybe I'm not aware of?  Thank you!

    a hash table stores the objects using the hash of the key value.
    If you use long as a key of a hash function is provided, but if you use a custom key you need to implement the code of hash and equals (eclipse has a nice convenience for this function).

    with regard to the grouping: you do not have a complete data model so you have to write your own. functions of Hashtable are not that slow, so unless you're really in a rush in the calculation of the time you should be fine just the addition of different values.
    If your table should store only the dates, you can use http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/util/LongHashtable.html , which should still be a little faster.

Maybe you are looking for