Commit fa6482f3 authored by zeroleak's avatar zeroleak
Browse files

use extlibj:cahoots-SNAPSHOT

parent bd93c945
......@@ -25,7 +25,7 @@
<dependency>
<groupId>io.samourai.code.wallet</groupId>
<artifactId>extlibj</artifactId>
<version>develop-SNAPSHOT</version>
<version>cahoots-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.samourai.code.wallet</groupId>
......
package com.samourai.whirlpool.client.wallet.beans;
import java.util.Arrays;
import java8.util.Optional;
import java8.util.function.Predicate;
import java8.util.stream.Collectors;
import java8.util.stream.StreamSupport;
......@@ -37,6 +38,15 @@ public enum WhirlpoolAccount {
return active;
}
public static Optional<WhirlpoolAccount> find(int index) {
for (WhirlpoolAccount whirlpoolAccount : values()) {
if (whirlpoolAccount.getAccountIndex() == index) {
return Optional.of(whirlpoolAccount);
}
}
return Optional.empty();
}
public static WhirlpoolAccount[] getListByActive(final boolean active) {
return StreamSupport.stream(Arrays.asList(values()))
.filter(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment