BAEL-2969: Copying Sets in Java
This commit is contained in:
parent
858927c985
commit
d69a81e25c
@ -1,5 +1,4 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>core-java-collections-set</artifactId>
|
<artifactId>core-java-collections-set</artifactId>
|
||||||
|
@ -50,7 +50,8 @@ public class CopySets {
|
|||||||
|
|
||||||
// Collectors.toSet
|
// Collectors.toSet
|
||||||
public static <T extends Serializable> Set<T> copyByCollectorsToSet(Set<T> original) {
|
public static <T extends Serializable> Set<T> copyByCollectorsToSet(Set<T> original) {
|
||||||
Set<T> copy = original.stream().collect(Collectors.toSet());
|
Set<T> copy = original.stream()
|
||||||
|
.collect(Collectors.toSet());
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user