1
2 package org.paneris.util;
3
4
5
6
7
8
9
10
11 public class UniqueVector extends JoinVector {
12
13 private static final long serialVersionUID = 1L;
14
15
16
17
18 public UniqueVector() {
19 super();
20 }
21
22
23
24
25 public UniqueVector(int initialCapacity) {
26 super(initialCapacity);
27 }
28
29
30
31
32 public UniqueVector(int initialCapacity, int capacityIncrement) {
33 super(initialCapacity, capacityIncrement);
34 }
35
36
37
38
39
40 public boolean addUniqueElement(Object obj) {
41 if (!this.contains(obj)) {
42 this.addElement(obj);
43 return true;
44 } else {
45 return false;
46 }
47 }
48 }
49