Java Vector hasDuplicates(Vector v)

Here you can find the source of hasDuplicates(Vector v)

Description

has Duplicates

License

Apache License

Declaration

public static boolean hasDuplicates(Vector v) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.*;

public class Main {
    public static boolean hasDuplicates(Vector v) {
        int i = 0;
        int j = 0;
        boolean duplicates = false;

        for (i = 0; i < v.size() - 1; i++) {
            for (j = (i + 1); j < v.size(); j++) {
                if (v.elementAt(i).toString().equalsIgnoreCase(v.elementAt(j).toString())) {
                    duplicates = true;// ww w .j  av a 2 s  .co  m
                }

            }

        }

        return duplicates;
    }
}

Related

  1. copyVector(Vector V)
  2. deleteLast(Vector list)
  3. enumerationToVector(Enumeration pEnumeration_)
  4. getCommaListFromVector(Vector sourceVector)
  5. getNonNullVectors(int[][] usageM)
  6. isContained(Object obj, Vector vect)
  7. median(double[] vector)
  8. normVector(List v1)
  9. removeDuplicateDomains(Vector s)