Solved

single key multiple values class

Posted on 2001-07-27
5
3,352 Views
Last Modified: 2012-05-04
I would like to get hold of a class which supports single key and multiple values somewhat similar to key-value pairs in hashtable, dictionary. The key-value pair properties must be configurable. If existing java classes are not supporting, tell me the process as to how i can continue my work.
0
Comment
Question by:k_murli_krishna
  • 3
  • 2
5 Comments
 
LVL 8

Accepted Solution

by:
diakov earned 50 total points
ID: 6326763
Put collections in a Hashtable. This way you have many values associated to a key. Or do you mean something else?

Cheers,
  Nik
0
 
LVL 1

Expert Comment

by:yaseransari
ID: 6326793
Hello
     Hashtable would do. Just put a vector of values against the key . Then pick up the required value from the
vector.
simple


Regards
Yaser Ansari
0
 
LVL 8

Expert Comment

by:diakov
ID: 6326944
to yaseransari :

how does your comment differ from mine? try to bring something new to the discussion.

Cheers,
  Nik
0
 
LVL 1

Expert Comment

by:yaseransari
ID: 6327030
to diakov:
         i didnt know that there was a similar comment already.

Regards
Yaser Ansari
0
 
LVL 8

Expert Comment

by:diakov
ID: 6333384
Sory, I appologize. I should have looked at the posting time.

Cheers,
  Nik
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
nextBoolean(double p) for Random class 3 41
expectj telnet failing 5 45
ejb on wildfly 5 30
Delphi Firemonkey: if the Sms contain special characters it won't send it 3 43
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question