mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Sort static factory methods at bottom
This commit is contained in:
parent
fb856aea95
commit
08ca7ee0f9
@ -28,17 +28,6 @@ import java.util.stream.Collector;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
class SeedNodeAddresses extends ImmutableSetDecorator<NodeAddress> {
|
||||
public static SeedNodeAddresses fromString(String seedNodes) {
|
||||
if (seedNodes.isEmpty()) {
|
||||
return new SeedNodeAddresses(Collections.emptySet());
|
||||
}
|
||||
|
||||
String trimmed = StringUtils.deleteWhitespace(seedNodes);
|
||||
String[] nodes = trimmed.split(",");
|
||||
return Arrays.stream(nodes)
|
||||
.map(NodeAddress::new)
|
||||
.collect(collector());
|
||||
}
|
||||
|
||||
public SeedNodeAddresses(Set<NodeAddress> delegate) {
|
||||
super(delegate);
|
||||
@ -62,4 +51,16 @@ class SeedNodeAddresses extends ImmutableSetDecorator<NodeAddress> {
|
||||
public static Collector<NodeAddress, ?, SeedNodeAddresses> collector() {
|
||||
return Collectors.collectingAndThen(Collectors.toSet(), SeedNodeAddresses::new);
|
||||
}
|
||||
|
||||
public static SeedNodeAddresses fromString(String seedNodes) {
|
||||
if (seedNodes.isEmpty()) {
|
||||
return new SeedNodeAddresses(Collections.emptySet());
|
||||
}
|
||||
|
||||
String trimmed = StringUtils.deleteWhitespace(seedNodes);
|
||||
String[] nodes = trimmed.split(",");
|
||||
return Arrays.stream(nodes)
|
||||
.map(NodeAddress::new)
|
||||
.collect(collector());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user