Revision 1014,
457 bytes
checked in by alexandrecorreia, 15 years ago
(diff) |
Ticket #552 - Inclusão do projeto Java referente ao applet do módulo.
|
Line | |
---|
1 | package com.swabunga.util; |
---|
2 | |
---|
3 | import java.util.Iterator; |
---|
4 | import java.util.List; |
---|
5 | |
---|
6 | public class VectorUtility { |
---|
7 | public static List addAll(List dest, List src) { |
---|
8 | return addAll(dest, src, true); |
---|
9 | } |
---|
10 | |
---|
11 | public static List addAll(List dest, List src, boolean allow_duplicates) { |
---|
12 | for (Iterator e = src.iterator(); e.hasNext();) { |
---|
13 | Object o = e.next(); |
---|
14 | if (allow_duplicates || !dest.contains(o)) |
---|
15 | dest.add(o); |
---|
16 | } |
---|
17 | return dest; |
---|
18 | } |
---|
19 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.