| Author |
Opposite of a Union
|
Noah Le
Greenhorn
Joined: Aug 12, 2003
Posts: 4
|
|
|
I can't remember the term. Can anyone tell me? It's when you take 2 sets of data and only keep data that's in both sets. also, does Java have a function that performs this action?
|
 |
Ron Newman
Ranch Hand
Joined: Jun 06, 2002
Posts: 1056
|
|
That's called an "intersection". The Java function, in the Set interface, is retainAll(). Union is addAll(). Set subtraction is removeAll().
|
Ron Newman - SCJP 1.2 (100%, 7 August 2002)
|
 |
 |
|
|
subject: Opposite of a Union
|
|
|