File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
fj-core/src/main/java/org/fugerit/java/core/lang/helpers Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change 22
33import java .io .PrintStream ;
44import java .util .ArrayList ;
5+ import java .util .Collection ;
6+ import java .util .Collections ;
57import java .util .List ;
68
79/**
@@ -95,5 +97,22 @@ public Result() {
9597 this .fatalList = new ArrayList <Exception >();
9698 this .warningList = new ArrayList <Exception >();
9799 }
98-
100+
101+ public Collection <Exception > errors () {
102+ return Collections .unmodifiableCollection ( this .errorList );
103+ }
104+
105+ public Collection <Exception > fatals () {
106+ return Collections .unmodifiableCollection ( this .fatalList );
107+ }
108+
109+ public Collection <Exception > warnings () {
110+ return Collections .unmodifiableCollection ( this .warningList );
111+ }
112+
113+
114+ public Collection <Exception > fatalsAndErrors () {
115+ return Collections .unmodifiableCollection ( CollectionUtils .merge ( new ArrayList <Exception >( this .fatalList ) , this .errorList ) );
116+ }
117+
99118}
You can’t perform that action at this time.
0 commit comments