Java Vector isContained(Object obj, Vector vect)

Here you can find the source of isContained(Object obj, Vector vect)

Description

Check if object is contained in vector

License

Open Source License

Parameter

Parameter Description
obj the object to check for
vect the vector to check in

Declaration

public static boolean isContained(Object obj, Vector vect) 

Method Source Code

//package com.java2s;
/* IBS Copyright/Security Notice ***************************************
 *                                              
 *  BAP Property of IBS AB//from w  ww  . j av a 2 s. c  o m
 *  (C) Copyright IBS AB 2001
 *  All rights reserved.                        
 *  Use, duplication, or disclosure restricted  
 *  by license agreement with IBS AB.           
 *                                              
 *  Licensed Materials - Property of IBS AB     
 *                                              
 * End IBS Copyright/Security Notice **********************************/

import java.util.*;

public class Main {
    /**
     * Check if object is contained in vector
     *
     * @param   obj    the object to check for
     * @param   vect   the vector to check in
     */
    public static boolean isContained(Object obj, Vector vect) {
        if (obj == null || vect == null) {
            return false;
        }
        return vect.contains(obj);
    }
}

Related

  1. deleteLast(Vector list)
  2. enumerationToVector(Enumeration pEnumeration_)
  3. getCommaListFromVector(Vector sourceVector)
  4. getNonNullVectors(int[][] usageM)
  5. hasDuplicates(Vector v)
  6. median(double[] vector)
  7. normVector(List v1)
  8. removeDuplicateDomains(Vector s)
  9. removeDuplicates(Vector s)