When should I use HashTable and how to use it.

I have created a set of diamond and retangular images with different colors and one color is assigned to one objective type.
My application reads the XML file to get information about these objective type to populate it into the GUI with its
associated attributes such as time, distance, longtitude latitude etc.. How do I store and retrieve these information.
I think of using hashtable but not sure. Could you please help some idea .
Thanks

use ur code like this to maintain multivalues
ArrayList al=new ArrayList();
al.add(new Bean(value1,value2,value3));
HashTable ht=new HashTable();
ht.add(key,al);

Similar Messages

  • What is the difference between saving to "Documents" and "Macintosh HD" and when should you use each one?*

    What is the difference between saving to "Documents" and "Macintosh HD" and when should you use each one?

    When you save to the folder with the little house icon, the file is placed at
    /Users/your_user_name/
    You would really have to go out of my way to save at:
    (the shortcut for the Boot Drive, regardless of its name).
    I am not sure how you decided that Time Machine is not saving your files. The default is for Time Machine to do incremental Backups of everything on all attached drives, except for certain temporary information in Cache files. If you have four Users, Time Machine will back them all up.
    Looking at the raw Time Machine backups will tell you very little, because it does lots of its work with Hard Links, and because it does incremental backups, so only files that changed since the last Backup are saved at thet cycle. The way to determine whether Time Machine is saving things is to display the window you care about in the Finder, then invoke the "Star wars"/ "Back, back, back in time" Interface.

  • When should I use static variable and when should not? Java essential

    When should I use static variable and when should not? Java essential

    Static => same value for all instances of the class.
    Non-static => each instance can have its own value.
    Which you need in which circumstances is completely up to you.

  • When should a subclass have its own fields and when should it use its super

    When should a subclass have its own fields and when should it use its superclass' fields?
    Hi, thank you for reading this post!
    Let me use a specific example to ask my question.
    public class BankAccount {
         private double accountBalance;
         public double getBalance() {
              return this.accountBalance;
    public class SavingsAccount extends BankAccount {
         private double accountBalance;
         public double getBalance() {
              return this.accountBalance;
    }In the bank account example, both BankAccount and SavingsAccount will have a method getBalance(). Therefore, they
    both require a account balance field. My question is since getBalance() for both classes will perform the exact same
    operation, when should I omit declaring the getBalance() method and the accountBalance field in the subclass, and
    when should I include them?
    My own thought is when we never have to instantiate a superclass object (e.g. an abstract class), then we place
    common fields in the abstract superclass and have subclasses access these fields via protected getter/setters to
    access the superclass' fields. This is the principle of reuse.
    But when you do need to instantiate a superclass and the superclass does need to maintain its own fields, then
    I would need to duplicate the accountBalance field and getBalance() method in the subclass.
    Is my thinking correct or incorrect?
    Thank you in advance for your help!
    Eric
    Edited by: er**** on 22-Aug-2011 20:19

    er**** wrote:
    If SavingsAccount inherit BankAccount.getBalance()...getBalance() would return BankAccount's accountBalance. This is NOT the correct result we want.Actually, I think it's precisely what you want.
    We want getBalance() to return BankAccount's accountBalance when we use a BankAccount object, and SavingsAccount's accountBalance when we use a SavingsAccount object.I seriously doubt that. I think you're confusing a BankAccount with a Customer, who can have more than one account.
    In every system I've ever seen, a SavingsAccount IS-A BankAccount - that is to say, it's a genuine subtype. Now, it may well contain other fields ('interest'?) that a normal account wouldn't, but 'balance' ain't one of them.
    Winston

  • What are the mapfiles for and when should I use them?

    Hi,
    what are the map files for and why/when should I use them?
    /usr/lib/ld/map.noexstk
    usr/lib/ld/map.noexbss
    /usr/lib/ld/map.noexdata
    /usr/lib/ld/map.pagealign

    Hi, I'm sure you've read the comments, but for the benefit of those who haven't: /usr/lib/ld/map.noexstk # Linker mapfile to create a non-executable stack definition within an # executable. /usr/lib/ld/map.noexbss # Link-editor mapfile to create a non-executable bss segment definition # within an executable. /usr/lib/ld/map.noexdata # Link-editor mapfile to create a non-executable data segment definition # within an executable. These stop the various segments from being executable. Which could reduce the risk surface for exploiting security holes in an application. /usr/lib/ld/map.pagealign # Linker mapfile to create page-aligned data within an executable. Aligning the start of the data segment can reduce the number of TLB entries needed to map the data. So the smallest TLB page size is 8KB, then we have 64KB, then 4MB etc. If the data starts on a 4MB boundary then it can be mapped with 4MB pages, if not then it has to be mapped with 8KB pages until a 64KB boundary, then 64KB pages until we get to a 4MB boundary. You sometimes get a bit of performance from this, but you may also get performance stability from it. If the mapping is random sometimes it works well, sometimes it works less well. Regards, Darryl.

  • When should I use validate(), reValidate, and inValidate()?

    When should I use validate(), reValidate, and inValidate()? Also, I would like some detailed differences on them.
    Virum

    Anyone?

  • Why or When should we use Execute Immediate in PLSQL??

    Hi Frnds,
    Long Ago i have received a interview question that ...
    How can U create a table in the PLSQL object(Function or procedure)?
    But the thing y should we use execute immediate?
    In which scenario we should we should use????????????
    Why or When should we use Execute Immediate in PLSQL????

    OR
    http://stackoverflow.com/questions/18375990/oracle-what-does-execute-immediate-means
    For DML you'd use it when running statements that you don't have available at compile time, e.g. if the column list is based on a selection from the user.
    In your case it's being used because DDL cannot be run as static SQL from within PL/SQL. Only certain query, DML and TCL commands are valid. Anything else has to be treated as dynamic.
    I'd say it's rare to need to use DDL from a PL/SQL block. TRUNCATE might be reasonable; if you find anything creating or dropping objects on the fly then that might be more of a concern as it can suggest a suboptimal data model.
    EXECUTE IMMEDIATE itself does not automatically commit; but if you execute DDL then that will behave the same as if you ran it outside PL/SQL, so it will commit in your case, yes.
    Incidentally, I'm not sure why your code is using an intermediate variable to hold the statement; that's useful if you want to display what it's going to run maybe, but you don't seem to be doing that. What you have could be done as:
    EXECUTE IMMEDIATE 'TRUNCATE TABLE BD_BIDS_EXT_DET';
    Thank you

  • J1INCHLN when should I use error control mode checkbox

    Hi Experts,
    I am using t-code J1INCHLN for creating remittance Challan.
    But in ECC6, EHP 5 there is new functionality added & no documentation available for same.
    There is one field with tick option called Error Control Mode.so when should i use this functionality.
    Can anyone help on this?
    Thanks and Regards,
    Sameer

    HI
    Please refer the note no :  1567443
    Manual Control in J1INCHLN to change currency key/doc type
    "After this, if you will run J1INCHLN, you will get a checkbox at the end
    with 'Error Control Mode' which will be selected by default. If you want
    to change document type, currency or rate during processing, you should
    uncheck it else it will take you to the last screen."
    I hope note is allready available in your system hence you are getting above cheeck box.
    If you want to change the document type and currency or rate during posting then you need use the check box.
    Regards
    Madhu M

  • When should you use dmg vs copy or duplicate

    When should you use dmg vs copy or duplicate

    Your answers are very helpful. They encourage me to ask the more complete and complicated question: we have a web site that was developed using iWeb several years ago. iWeb support was dropped by Apple some years ago and we moved the site to GoDaddy, but still using the iWeb software. Now we have only 1 computer which can continue to edit, add to and support our web site. Our aim is to copy as much of our material as we can so that when this computer finally dies we can salvage as much of our material as we can to resurrect our site once more. GoDaddy says they cannot help us.
    Here is my wife's web site:
    www.adajillschneider.com
    Thanks for all your time and help.
    Ron Schneider

  • When Should I use the Inner Classes ?

    When Should I use the Inner Classes ?
    What is the advantage(s) and the disadvantage(s) ?

    When I use innerclasses?
    1) Allmost allways when I need simple owner child behavior.
    2) When I need a behaviour, that is quite small, and used only once, I make it anonymous inner class. For example specialised streams and threads.
    3) Enumerations

  • Why does iPhone automatically enter my entire email address when I simply type "gmail" and how to I turn it off?

    Why does my iPhone automatically enter my entire email address when I simply type "gmail" and how to I turn it off?  It also does it whenever I type it in Safari (but not Chrome) and it only does it with one of my email addresses and not any of my other ones (i.e., yahoo, hotmail, etc.). 
    Thanks so much for your help!

    I don't see visible underscores in that login form, but they appear to be entered (that form isn't high enough to show them for me).
    You can verify that in the Scratchpad and use Execute > Display after pasting the below posted code.
    * Firefox/Tools > Web Developer > Scratchpad (Shift+F4)
    <pre><nowiki>document.getElementById("userid").value;</nowiki></pre>

  • When should one use final arguments?

    Hi all,
    When should one use final arguments?
    I have searched the forum for this, but couldnt find a precise answer. I am specifically looking for cases where they are:-
    1. the only way to acheive something
    OR
    2. the stylistic way to acheive something.
    Thanks,
    Binil

    My $0.02 - I don't think (practically) you ever need
    final method parameters (it's not like they prevent
    subclassing or anything). However, I think (stylistically)
    you should make method parameters final wherever you
    can - it makes the code a more explicit (the contract
    between the invoker and the invokee is clearer).
    I seem to recall something about JVMs being able to
    optimize methods with final parameters better too, but that might just be moonshine or more people would
    (probably) be going on about it.

  • I have word, iTunes, and other application that starts automatically when I start my laptop and how can i change start up options?

    I have word, iTunes, and other application that starts automatically when I start my laptop and how can i change start up options?

    Go to System Preferences / Accounts - Login Items.
    In order to make changes, click the lock icon bottom left corner of the pane. You may be prompted for your admin password.
    Select the apps you don't want to launch on startup then click - (minus).

  • Why people are being referred to iTunes Terms of Sales when unable to make purchases and how it can be resolved?

    Why people are being referred to iTunes Terms of Sales when unable to make purchases and how it can be resolved????

    Tianechet Longchar wrote:
    "Your purcahse could not be completed. Please contact support".
    Thats the error message when trying to purchase
    I see nothing there that is referring you to the Terms of Sale. You're being told to contact iTunes Support. These are user-to-user support forums, if you thought you were contacting Apple by posting here. Go here:
    http://www.apple.com/emea/support/itunes/contact.html
    to contact the iTunes Store.
    Regards.

  • HT4571 When should I use data roaming?

    When should I use data roaming?

    When you are outside your carrier's network, you may be able to access the Internet using another wireless carrier, that's dataroaming.
    More info; http://support.apple.com/kb/HT1976

  • When should I use the power adapter?

    I just installed a wireless router. Should I use the power adapter when I'm not going to use the Macbook for several hours? Does the Macbook drain the battery when it is shut down or sleeping?

    When should I use the power adapter?
    Whenever you are near a power outlet. Not 100% of the time, of course (you have to flex the battery sometimes) but as often as possible.
    Should I use the power adapter when I'm not going to use the Macbook for several hours?
    If you are near an outlet, yes.
    Does the Macbook drain the battery when it is shut down or sleeping?
    When sleeping, it drains a negligible amount.
    Further reading:
    http://support.apple.com/kb/HT1446
    http://support.apple.com/kb/HT1490

Maybe you are looking for

  • Vendor down payments recovery mangement

    I am working on an MIS report in which I have to mention the Original down payment given to the vendor against the current outstanding advance and ageing analysis. As per the current practice in our company while accounting the recoveries against run

  • ANY UPDATE ON PDF READER FOR CURVE 2 AND MORE ON BB PROTECT

    Please, I need an update if free pdf reader is now available for curve 2, OS V5. Please, how strong is Blackberry protect application on device installed  when intruders try to wide/format device and can I still have access to the device if number is

  • Handling Audio streams accross a network

    Hi, I have written a Computer Telephony Interface package for a SIP based PBX system and I'm currently exploring the possibility of turning it into a fully functional SIP softphone. The program has a basic SIP stack which I have extended to include t

  • Hosting different hostname question.

    I know windows server can host two different hostname use port 80 together. in windows call it "Advanced Multiple Web Site Configuration".I running a osx server 10.4 with web service,Is it possible actualize same function on my server? Appreciate any

  • What is the customer service

    What is the customer service phone number for creative in the US. I am located in CA, and cant find the phone suppoet on their website