element « HashTable « Java Collection Q&A

Home
Java Collection Q&A
1.algorithm
2.array
3.Array Byte
4.Array Char
5.Array Convert
6.Array Dimension
7.Array Integer
8.Array Object
9.Array String
10.ArrayList
11.collection
12.comparator
13.Development
14.Garbage Collection
15.Generic
16.hash
17.HashMap
18.HashTable
19.iterator
20.LinkedList
21.List
22.Map
23.queue
24.Set
25.Sort
26.tree
Java Collection Q&A » HashTable » element 

1. remove element of an hashtable in the iteration    stackoverflow.com

Is following code the safe way to remove a element in the Hashtable?

   Enumeration keys = siCache.keys();  //siCache is Hashtable

    while(keys.hasMoreElements())
    ...

2. How to copy Key Value Elements from one Hash Table to the other HT    stackoverflow.com

I am trying to copy first 5 key value pair from Hash Table 1 to Hash Table 2 and Then next 6 to 10th Key value pair from Hash Table 1 to ...

3. help need in Hashtable elements remove dynamically    coderanch.com

Hi All, I need your help in solving a problem i am facing. I am reading files from a particular folder and storing them into Hashtable(Key is filename and value is file object). I need to read this Hashtable for a particular file extention. After getting particular file, i need to search associated files of first file in the same Hashtable. ...

4. elements from hashtable by index    coderanch.com

A hash table doesn't have an index per say. You can not say "hashTableVar[ 8 ]" for example. A hash table uses "keys" and "values". Each key will lead you to a value. HashTable[ key ] = value You can think of it this way. Using the key you can access the value. The hashtable class has an "elements" method which ...

5. Hashtable elements to vector    coderanch.com

6. How to merge two hashtables elements in another hashtable?    coderanch.com

Iterate through First hashtable based on the KeySet for each key from the firsthashtable get value from 2nd one. (Null means no value present) concant the values as you required. put it in the 3rd one. copy the rest from 1st and 2nd hashtable to 3rd one. I think this is what you expecting

8. How to sort elements in Hashtable.    forums.oracle.com

9. Best way to cummulatively add elements to a hash table    forums.oracle.com

A Map is there to hold key-value pairs. Nothing less or more. If you want to associate multiple values with a single key, then use a Collection or array as Map value. If you find it dirty, just write your own 'Tree' class which is backed by a Map> or so which provides sensible methods to do whatever you want ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.