hashset
Does HashSet.equals() run in constant time?
Just wondering if HashSet.equals(anotherHashSet) runs in constant time (also with a ConcurrentHashSet as argument), which I\'m assuming it does for efficiency reasons. Can\'t see anything which mentio[详细]
2023-02-21 23:39 分类:问答is Java HashSet thread-safe for read only?
If I have an instance of an HashSet after I ran it through Collections.unmodifiableSet(), is it thread-safe?[详细]
2023-02-19 05:08 分类:问答Objects equal, hashcodes equal, HashSet contains one but not the other---how?
I have an (immutable) object, Group, which I am trying to use in a HashSet. However, I am getting odd results:[详细]
2023-02-18 15:59 分类:问答HashSet of ByteBuffer(actually integers) to separate unique & non unique elements from a ByteBuffer array
I have an array of ByteBuffers(which actually represent integers). I want to the separate unique & non unique ByteBuffers (i.e integers) in the array. Thus I am using HashSet of this type:[详细]
2023-02-18 04:42 分类:问答Adding elements in a set
I have to create a course with some undergraduate and postgraduate students, then extract from the course all postgraduate students with “Ismael Bento” as their supervisor using the method getPostgr[详细]
2023-02-17 13:54 分类:问答What load factor should be used when you know maximum possible no of elements in HashSet
What load factor should I use when I really know the maximum possible no of elements in a HashSet ? I had heard that the default load factor of 0.75 is recommended as it offers good performance trade-[详细]
2023-02-16 08:46 分类:问答looping over static Set- java
I have in my code: public static Set<Long> workItemsForTasks = new HashSet<Long>(); It\'s a web application, and during the code the users can add new items to the map - and I add in th[详细]
2023-02-16 07:05 分类:问答Java HashSet duplicates comparison
I have a class Person which contains String firstName, lastName. I want to insert instances of this class into a List, but I don\'t want to insert duplicates.[详细]
2023-02-14 12:23 分类:问答Counting clusters in a hashset in c
I\'m making a hashset ADT in c for a homework assignment. I cannot figure out for the life of me why my logic isn\'t working for a function that counts clusters in a hashset.[详细]
2023-02-14 11:36 分类:问答HashSet vs LinkedHashSet
What is the difference between them? I know that A LinkedHashSet is an ordered version of HashSet that[详细]
2023-02-12 21:41 分类:问答