Package org.eclipse.emf.compare.internal.utils

# Class SafeSubMonitor

java.lang.Object
org.eclipse.emf.common.util.BasicMonitor.Delegating
org.eclipse.emf.compare.internal.utils.SafeSubMonitor

All Implemented Interfaces:
  `Monitor`

public class SafeSubMonitor extends BasicMonitor.Delegating implements Monitor
An EMF `Monitor` that can be safely passed to clients because it will ignore calls to `worked(int)` and `done()` to allow the caller to master the number of ticks consumed, whatever the clients do with the monitor. Such a monitor allows clients to cancel an operation while preventing them to negatively (or positively alas) impact the progress report.

## Field Summary

### Fields inherited from class org.eclipse.emf.common.util.BasicMonitor.Delegating

`monitor`

### Fields inherited from interface org.eclipse.emf.common.util.Monitor

`UNKNOWN`

## Constructor Summary

Constructors
Constructor
Description
`SafeSubMonitor(Monitor monitor)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`void`
`done()`
`void`
`worked(int work)`

### Methods inherited from class org.eclipse.emf.common.util.BasicMonitor.Delegating

`beginTask, clearBlocked, internalWorked, isCanceled, setBlocked, setCanceled, setTaskName, subTask`

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

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

### Methods inherited from interface org.eclipse.emf.common.util.Monitor

`beginTask, clearBlocked, internalWorked, isCanceled, setBlocked, setCanceled, setTaskName, subTask`

## Constructor Details

### SafeSubMonitor

public SafeSubMonitor(Monitor monitor)
Constructor.

Parameters:
  `monitor` - The wrapped monitor.

## Method Details

### worked

public void worked(int work)

Specified by:
  `worked` in interface `Monitor`
Overrides:
  `worked` in class `BasicMonitor.Delegating`

### done

public void done()

Specified by:
  `done` in interface `Monitor`
Overrides:
  `done` in class `BasicMonitor.Delegating`