if (v1 == null || v2 == null) { return null; Vector v = new Vector(); if (v1.isEmpty() || v2.isEmpty()) { return v; int size = v1.size(); ...
Vector r = new Vector(); for (int i = 0; i < a.size(); i++) r.add(a.elementAt(i)); for (int i = 0; i < b.size(); i++) r.add(b.elementAt(i)); return r;
This method returns a Vector containing the union of the objects contained in vectA and vectB.
int threshold = 0; if (vectA != null) { threshold = vectA.size(); if (vectB != null) { threshold += vectB.size(); if (threshold < 10) ...
This method adds obj to vect if and only if vect does not already contain obj.
if (obj == null) { return; if (vect.contains(obj)) { return; vect.addElement(obj);