Questions tagged [keyset]

76 questions
0
votes
0 answers

Where should the implementation of com.ibm.websphere.crypto.KeyGenerator in WebSphere be placed?

For KeySet configuration in WebSphere, I have to provide implementation of com.ibm.websphere.crypto.KeyGenerator interface. I dont know where to place this implementation class on Server.
0
votes
1 answer

Websphere keyset not get the latest key

I have a problem with a Websphere keyset. I create a keystore using a public key that was generated on another computer with keytool using this command: keytool -import -noprompt -alias eeccstore -keystore eeccstore.jks -file…
0
votes
1 answer

Efficient way of Searching in JSON Object in java

I have a list of JSON Objects as: [{"name":"abc","id":"123"},{"name":"xyz","id":"345"}..] and a set of parameters like {"abc","def","xyz"}. I want to check whether the second set of parameters contains value that are not in name field of JSON Object…
usergs
  • 1,344
  • 3
  • 9
  • 18
0
votes
3 answers

How to put all String constants declared in a class and its inner classes in a single keySet

Perhaps the hidden question is which structure to use for keys that have a sort of hierarchy (therefore my attempt in using classes and inner classes, so that a test on specific subsets is possible). I'm looking for a structure where I can add a new…
0
votes
2 answers

How to access to a hashmap keyset with arraylist

Actually, I create a new ArrayList of keyset of a LinkedHashMap every time I want the position of a key. public static Map ObjectsWithId = new LinkedHashMap<>(); public int getId(int number) { return (number <=…
0
votes
1 answer

keySet() or propertyNames(). Is using propertyName() ok?

I am working with a java.util.Properties object, and I generally use keySet() to get all the keys of the properties. I was wondering which is better keySet() or propertyNames(). propertyNames() returns the enumeration of the keys - is it because…
bitemouth
  • 123
  • 8
0
votes
2 answers

In class A, I want to go throught the keySet of a HashMap in class B

I want to go through each key in a keySet of a HashMap from another class. Right now this is what I have: Admin.java import java.util.HashMap public class Admin { public static HashMap person = new HashMap(); …
Jalokoh
  • 49
  • 7
0
votes
1 answer

How to implement keySet method in Binary Search Tree

import tree.BinaryTree; public class TreeMap, V> implements MyMap { private BinaryTree map; java.util.Set keys; private int size; @Override public java.util.Set keySet() { …
0
votes
1 answer

Application stops when clicked on item in ExpandableListview Android

I'm trying to create an ExpandableListView, below is my code for creating data for the expandable list DBHelper dbHelper; ExpandableListAdapter listAdapter; ExpandableListView expListView; HashMap>…
Kairi San
  • 239
  • 1
  • 9
  • 23
0
votes
2 answers

How to get separate key and value of hashmap without iteration

Here key as difference of latitude and longitude and value as list of String values. I want to do separate key and value of hashmap. Is it possible to do that??? Please suggest me. MainActivity.java public void getExpandableListData() { …
abc
  • 67
  • 3
  • 11
0
votes
3 answers

How to test collections in Junit (Java)

I need to implement a sparse graph and do some junit tests on it. This is my graph class: package graphs; import java.util.Collection; import java.util.HashMap; public class SparseGraph implements Graph { HashMap>…
Don Diego
  • 1,309
  • 3
  • 23
  • 46
0
votes
1 answer

JAVA: HashMap - How can I associate the values?

I'm having a little difficulty getting my head around a hashmap I'm trying to implement. The basic premise is that I have a list of stations in a txt file, with the "connections" between each. Something like; Connection: Station1 Station2…
JavaStarta
  • 67
  • 1
  • 11
0
votes
1 answer

Method doesn't work for large data set

I am trying to find the most central character in a data set that contains every Marvel character and every book they've been in. The code I have written below works for a small test file that we created ourselves to test the method more quickly but…
vastopa
  • 201
  • 2
  • 8
0
votes
4 answers

While using 2 different HashMaps, i'm able to create a keySet with the first but not the second

I'm working with 2 different HashMaps in a class, and when I call the keySet() method with the first (the getExitString() method), it works fine, but when I call it with the second (the getLockedDoors() method), I get the "cannot find symbol -…
Adam Berman
  • 784
  • 5
  • 16
0
votes
1 answer

Unexpected/undefined results when using Maps in Java

I'm doing some work trying to recommend documents, and to do so I am using the Cosine Similarity method. Here is the code for that method: static double cosineSimilarity(HashMap v1, HashMap v2) { Set both…
jk47
  • 755
  • 4
  • 10