key « Set « 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 » Set » key 

1. Java HashSet key/value pair    stackoverflow.com

Why does Java not provide functions to get at the key/value pairs in a HashSet like in Hashtable? It seems like a real pain to have to iterate over it every ...

2. Two Key HashSet?    stackoverflow.com

I need a HashSet implementation where the elements are a pair of Integers
eg. Set s = { {1,2} , {3,4} , {1,4}}. Here the set s has 3 elements. This ...

3. Getting value for key in HashSet    java-forums.org

Sorry. Here is my code: Set nodes = new HashSet(); Map> edges = new HashMap>(); public void addEdge(int p1, MethodNode m1, ClassNode c1, int p2, MethodNode m2, ClassNode c2) { Node n1 = new Node(p1,m1,c1); Node n2 = new Node(p2,m2,c2); nodes.add(n1); nodes.add(n2); edges.put(n1,nodes); My aim is to fetch the value of key n2 and add it to n1. but ...

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.