Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andrew Woods
committed
Oct 26, 2013
1 parent
7d7f27d
commit a687165
Showing
2 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,8 +44,7 @@ public class DifferencingIterator<E> extends AbstractIterator<E> { | |
/** | ||
* Ordinary constructor. | ||
* | ||
* @param notCommon | ||
* @param common | ||
* @param original | ||
* @param source | ||
*/ | ||
public DifferencingIterator(final Set<? extends E> original, | ||
|
@@ -86,7 +85,7 @@ protected E computeNext() { | |
* | ||
* @return The elements that turned out to be common to the two inputs. | ||
*/ | ||
public Set<E> common() { | ||
protected Set<E> common() { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
awoods
|
||
return source.hasNext() ? null : common; | ||
} | ||
|
||
|
@@ -95,7 +94,7 @@ public Set<E> common() { | |
* | ||
* @return The elements that turned out not to be common to the two inputs. | ||
*/ | ||
public Set<? extends E> notCommon() { | ||
protected Set<? extends E> notCommon() { | ||
This comment has been minimized.
Sorry, something went wrong. |
||
return source.hasNext() ? null : notCommon; | ||
} | ||
|
||
|
This is wrong. The whole purpose of this class is to provide access to the results of the calculation, including those elements found in common and not-in-common.