public interface DiagnosticFrequencyMap extends Iterable<org.eclipse.emf.common.util.Diagnostic>
| Modifier and Type | Interface and Description |
|---|---|
static class |
DiagnosticFrequencyMap.Limited
A frequency map of limited size that collects up to and no more than a certain
number of diagnostics, keeping the most severe of them.
|
static class |
DiagnosticFrequencyMap.Unlimited
A frequency map of unlimited size that keeps all diagnostics added to it.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(org.eclipse.emf.common.util.Diagnostic diagnostic)
Add a diagnostic.
|
default boolean |
addAll(Collection<?> diagnostics)
Add a bunch of diagnostics.
|
void |
addDiagnosticFilter(Predicate<? super org.eclipse.emf.common.util.Diagnostic> filter)
Add a predicate that matches diagnostics that should be collected.
|
default void |
appendTo(Collection<? super org.eclipse.emf.common.util.Diagnostic> diagnostics)
Append the diagnostics that I have collected, in decreasing severity order,
to a collection of
diagnostics. |
void |
clear()
Remove all diagnostics and histogram counts.
|
int |
getDiscardedSeverity()
Query the greatest severity of diagnostics that had to be discarded because the
map filled up.
|
boolean |
isEmpty()
Queries whether I am empty of any diagnostics.
|
boolean |
isFull()
Queries whether I am full to capacity, unable to accept any more diagnostics.
|
static DiagnosticFrequencyMap |
limitedTo(int size)
Create a frequency map that retains at most the given number of
most severe problems.
|
int |
size()
Queries the number of diagnostics that I contain.
|
static DiagnosticFrequencyMap |
unlimited()
Create a frequency map of unlimited size that keeps all diagnostics added to it.
|
forEach, iterator, spliteratorvoid clear()
int size()
boolean isEmpty()
true I have no diagnostics; false, otherwiseboolean isFull()
true if I have reached my limit of diagnostics; false, otherwiseint getDiscardedSeverity()
Diagnostic.OK if no diagnostics were discardedboolean add(org.eclipse.emf.common.util.Diagnostic diagnostic)
diagnostic - a diagnostic to addtrue if it was added; false, otherwise, for example if I am fullvoid addDiagnosticFilter(Predicate<? super org.eclipse.emf.common.util.Diagnostic> filter)
filters (overall, it's a conjunction).filter - a predicate matching diagnostics to acceptdefault boolean addAll(Collection<?> diagnostics)
diagnostics - some diagnostics to addtrue if any of them were added; false if noneadd(Diagnostic)default void appendTo(Collection<? super org.eclipse.emf.common.util.Diagnostic> diagnostics)
diagnostics.diagnostics - a collection of diagnostics to append tostatic DiagnosticFrequencyMap unlimited()
static DiagnosticFrequencyMap limitedTo(int size)
size - the maximal size of diagnostic collectionsize diagnostic frequency mapIllegalArgumentException - if the size is negativeCopyright © 2019. All rights reserved.