Hashtable FIFO problem


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Hashtable FIFO problem

  1. #1
    Sudhakar Koundinya Guest

    Hashtable FIFO problem


    Hi

    I have one problem using the Hastable. The problem is some thing like this.
    Dynamically (user's reuqest form) i am putting the data into the hashtable
    and maintaining the hashtable object in session. Using Enumerator object
    if i try to fetch the total information of hastable, enumerator is giving
    the information randomly instead of showing info as FIFO(First in First Out)
    way.What could be the problem?How to rectify the problem?Are there any other
    solutions?

    Thanks
    Sudhakar Chavali


  2. #2
    markN Guest

    Re: Hashtable FIFO problem


    This is a subject that has come up before. I think I remember that there
    might be a third party API you can buy or use that won't have this issue.
    Hashmap uses a hash table to store items and is really only good as a lookup.
    If you don't need the functionality of a Hashmap (key, value) then use an
    ArrayList. Look at TreeMap. If you need the functionality of
    both then you maybe should use both.

    Mark

    Look at this link on Java collections - http://developer.java.sun.com/develo...ringJava/Ch17/

    "Sudhakar Koundinya" <sudhakarchavali@hotmail.com> wrote:
    >
    >Hi
    >
    >I have one problem using the Hastable. The problem is some thing like this.
    >Dynamically (user's reuqest form) i am putting the data into the hashtable
    >and maintaining the hashtable object in session. Using Enumerator object
    >if i try to fetch the total information of hastable, enumerator is giving
    >the information randomly instead of showing info as FIFO(First in First

    Out)
    >way.What could be the problem?How to rectify the problem?Are there any other
    >solutions?
    >
    >Thanks
    >Sudhakar Chavali
    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center