Class DiagnosticFrequencyMap.Unlimited
- java.lang.Object
-
- org.eclipse.emfforms.spi.common.validation.DiagnosticFrequencyMap.Unlimited
-
- All Implemented Interfaces:
java.lang.Iterable<org.eclipse.emf.common.util.Diagnostic>,DiagnosticFrequencyMap
- Direct Known Subclasses:
DiagnosticFrequencyMap.Limited
- Enclosing interface:
- DiagnosticFrequencyMap
public static class DiagnosticFrequencyMap.Unlimited extends java.lang.Object implements DiagnosticFrequencyMap
A frequency map of unlimited size that keeps all diagnostics added to it.- Since:
- 1.21
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.emfforms.spi.common.validation.DiagnosticFrequencyMap
DiagnosticFrequencyMap.Limited, DiagnosticFrequencyMap.Unlimited
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(org.eclipse.emf.common.util.Diagnostic diagnostic)Add a diagnostic.voidaddDiagnosticFilter(java.util.function.Predicate<? super org.eclipse.emf.common.util.Diagnostic> filter)Add a predicate that matches diagnostics that should be collected.voidappendTo(java.util.Collection<? super org.eclipse.emf.common.util.Diagnostic> diagnostics)Append the diagnostics that I have collected, in decreasing severity order, to a collection ofdiagnostics.voidclear()Remove all diagnostics and histogram counts.intgetDiscardedSeverity()Query the greatest severity of diagnostics that had to be discarded because the map filled up.booleanisEmpty()Queries whether I am empty of any diagnostics.booleanisFull()Queries whether I am full to capacity, unable to accept any more diagnostics.java.util.Iterator<org.eclipse.emf.common.util.Diagnostic>iterator()intsize()Queries the number of diagnostics that I contain.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.emfforms.spi.common.validation.DiagnosticFrequencyMap
addAll
-
-
-
-
Method Detail
-
clear
public void clear()
Description copied from interface:DiagnosticFrequencyMapRemove all diagnostics and histogram counts.- Specified by:
clearin interfaceDiagnosticFrequencyMap
-
size
public int size()
Description copied from interface:DiagnosticFrequencyMapQueries the number of diagnostics that I contain.- Specified by:
sizein interfaceDiagnosticFrequencyMap- Returns:
- my size
-
isEmpty
public boolean isEmpty()
Description copied from interface:DiagnosticFrequencyMapQueries whether I am empty of any diagnostics.- Specified by:
isEmptyin interfaceDiagnosticFrequencyMap- Returns:
trueI have no diagnostics;false, otherwise
-
isFull
public boolean isFull()
Description copied from interface:DiagnosticFrequencyMapQueries whether I am full to capacity, unable to accept any more diagnostics.- Specified by:
isFullin interfaceDiagnosticFrequencyMap- Returns:
trueif I have reached my limit of diagnostics;false, otherwise
-
getDiscardedSeverity
public int getDiscardedSeverity()
Description copied from interface:DiagnosticFrequencyMapQuery the greatest severity of diagnostics that had to be discarded because the map filled up.- Specified by:
getDiscardedSeverityin interfaceDiagnosticFrequencyMap- Returns:
- the highest discarded severity, or
Diagnostic.OKif no diagnostics were discarded
-
add
public boolean add(org.eclipse.emf.common.util.Diagnostic diagnostic)
Description copied from interface:DiagnosticFrequencyMapAdd a diagnostic.- Specified by:
addin interfaceDiagnosticFrequencyMap- Parameters:
diagnostic- a diagnostic to add- Returns:
trueif it was added;false, otherwise, for example if I am full
-
addDiagnosticFilter
public void addDiagnosticFilter(java.util.function.Predicate<? super org.eclipse.emf.common.util.Diagnostic> filter)
Description copied from interface:DiagnosticFrequencyMapAdd a predicate that matches diagnostics that should be collected. Diagnostics that do not match the filter are discarded, but their severity is retained for separate reporting if the client should so wish. A diagnostic is only accepted that satisfies allfilters (overall, it's a conjunction).- Specified by:
addDiagnosticFilterin interfaceDiagnosticFrequencyMap- Parameters:
filter- a predicate matching diagnostics to accept
-
appendTo
public void appendTo(java.util.Collection<? super org.eclipse.emf.common.util.Diagnostic> diagnostics)
Description copied from interface:DiagnosticFrequencyMapAppend the diagnostics that I have collected, in decreasing severity order, to a collection ofdiagnostics.- Specified by:
appendToin interfaceDiagnosticFrequencyMap- Parameters:
diagnostics- a collection of diagnostics to append to
-
iterator
public java.util.Iterator<org.eclipse.emf.common.util.Diagnostic> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<org.eclipse.emf.common.util.Diagnostic>
-
-