Java Vector Union union(Vector a, Vector b)

Here you can find the source of union(Vector a, Vector b)

Description

union

License

Open Source License

Declaration

public static Vector union(Vector a, Vector b) 

Method Source Code

//package com.java2s;

import java.util.*;

public class Main {
    public static Vector union(Vector a, Vector b) {
        Vector r = new Vector();

        for (int i = 0; i < a.size(); i++)
            r.add(a.elementAt(i));//  ww w  . j  av a  2 s  .  co m

        for (int i = 0; i < b.size(); i++)
            r.add(b.elementAt(i));

        return r;
    }
}

Related

  1. mergeVectors(Vector v1, Vector v2)
  2. union(Vector vectA, Vector vectB)
  3. unionAdd(Vector vect, Object obj)