Skip to content

Commit 84b57ae

Browse files
committed
Merge branch 'develop'
2 parents f68a941 + 15906d6 commit 84b57ae

File tree

4 files changed

+35
-4
lines changed

4 files changed

+35
-4
lines changed

docgen/parameters.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"title" : "Jupiter (Fugerit Core A.P.I.)",
33
"name": "Jupiter",
4-
"version" : "0.8.5",
5-
"date" : "20/12/2021",
4+
"version" : "0.8.6",
5+
"date" : "28/12/2021",
66
"organization" : {
77
"name" : "Fugerit Org",
88
"url" : "https://www.fugerit.org"

docgen/release-notes.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
0.8.5 (2022-12-20)
1+
0.8.6 (2022-12-28)
2+
------------------
3+
+ Collections merge utility
4+
+ Result errors and warning accessory methods
5+
6+
0.8.5 (2022-12-20)
27
------------------
38
+ Added java major version check utilities
49

fj-core/src/main/java/org/fugerit/java/core/lang/helpers/CollectionUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,11 @@ public static <T> boolean addIfNotNull( Collection<T> c, T current ) {
4646
return added;
4747
}
4848

49+
public static <T> Collection<T> merge( Collection<T> merged, Collection<T> toAdd ) {
50+
if ( toAdd != null ) {
51+
merged.addAll( toAdd );
52+
}
53+
return merged;
54+
}
55+
4956
}

fj-core/src/main/java/org/fugerit/java/core/lang/helpers/Result.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
import java.io.PrintStream;
44
import java.util.ArrayList;
5+
import java.util.Collection;
6+
import java.util.Collections;
57
import 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
}

0 commit comments

Comments
 (0)