Here you can find the source of unique(Vector
public static Vector<String> unique(Vector<String> list)
//package com.java2s; /*L/*from w ww . jav a2s. c o m*/ * Copyright Northrop Grumman Information Technology. * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/nci-value-set-editor/LICENSE.txt for details. */ import java.util.*; public class Main { public static Vector<String> unique(Vector<String> list) { Vector<String> newList = new Vector<String>(); Iterator<String> iterator = list.iterator(); while (iterator.hasNext()) { String text = iterator.next(); if (!newList.contains(text)) newList.add(text); } return newList; } }