Here you can find the source of toHashSetD(Vector
public static HashSet<Double> toHashSetD(Vector<Double> vec)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static HashSet<Double> toHashSetD(Vector<Double> vec) { HashSet<Double> hashSet = new HashSet<Double>(); for (Double s : vec) { hashSet.add(s);//from ww w . ja va 2 s. c om } return hashSet; } }