org.eclipse.emf.compare.internal.conflict

## Class DiffTreeIterator

- java.lang.Object
- - org.eclipse.emf.compare.internal.conflict.DiffTreeIterator

All Implemented Interfaces:
  Iterator<Diff>

    public class DiffTreeIterator
    extends Object
    implements Iterator<Diff>

A custom iterator that will walk a Match->submatch tree, and allow iteration over the Diffs of these Matches.

Since we're walking over Matches but returning Diffs, this is not a good candidate for guava's filters. We're providing the custom `setFilter(Predicate)` and `setPruningFilter(Predicate)` to allow for filtering or pruning the the iteration.

### Constructor Summary

Constructors
Constructor and Description
`DiffTreeIterator(Match start)` Constructs our iterator given the root of the Match tree to iterate over.

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `hasNext()`
`Diff` `next()`
`void` `remove()`
`void` `setFilter(com.google.common.base.Predicate<? super Diff> filter)` Sets the criterion that Diffs must meet to be returned by this iterator.
`void` `setPruningFilter(com.google.common.base.Predicate<? super Match> pruningFilter)` Sets the pruning filter for this iterator.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface java.util.Iterator

`forEachRemaining`

### Constructor Detail

#### DiffTreeIterator

    public DiffTreeIterator(Match start)

Constructs our iterator given the root of the Match tree to iterate over.

Parameters:
  `start` - Starting match of the tree we'll iterate over.

### Method Detail

#### setFilter

    public void setFilter(com.google.common.base.Predicate<? super Diff> filter)

Sets the criterion that Diffs must meet to be returned by this iterator.

Parameters:
  `filter` - The filter differences must meet.

#### setPruningFilter

    public void setPruningFilter(com.google.common.base.Predicate<? super Match> pruningFilter)

Sets the pruning filter for this iterator. Any Match that meets this criterion will be pruned along with all of its differences and sub-differences.

Parameters:
  `pruningFilter` - The pruning filter for this iterator.

#### hasNext

    public boolean hasNext()

Specified by:
  `hasNext` in interface `Iterator<Diff>`
See Also:
  `Iterator.hasNext()`

#### next

    public Diff next()

Specified by:
  `next` in interface `Iterator<Diff>`
See Also:
  `Iterator.next()`

#### remove

    public void remove()

Specified by:
  `remove` in interface `Iterator<Diff>`
See Also:
  `Iterator.remove()`