我想重新包含一個包含字符串作爲關鍵字和一個集合作爲一個值的地圖,我應該怎麼做呢?這是我得到的。 /**
* A Class
*/
public class Catalog
{
private HashMap <String , Set<String> varieties> aCatalog;
/**
* Constructor for objects of
所以,我試圖創造有限HashSet,所以每當LimitedHashSet超過1024個元素,它拋出一個Error,不問,說明。 這裏是我到目前爲止的代碼, import java.util.HashSet;
public class LimitedHashSet<E> extends HashSet<E>{
public LimitedHashSet(){
super();
假設我有此類: public class Node implements Comparable<Node>{
public float key;
public TreeSet<Node> neighbors;
public Node{
//fill neighbors somehow
}
@Override
public i
我試圖來覆蓋提到的方法我HashSet: Set<MyObject> myObjectSet = new HashSet<MyObject>();
爲MyObject: public class MyObject implements Serializable {
private static final long serialVersionUID = 1L;
@Id