forked from External/mage
[LTR] Implement Long List of the Ents
This commit is contained in:
parent
9131e214b6
commit
579f953e8b
4 changed files with 227 additions and 1 deletions
|
|
@ -41,6 +41,7 @@ import org.apache.log4j.Logger;
|
|||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.Collections.emptyList;
|
||||
|
|
@ -1098,6 +1099,10 @@ public class GameState implements Serializable, Copyable<GameState> {
|
|||
return values.get(valueId);
|
||||
}
|
||||
|
||||
public Object computeValueIfAbsent(String valueId, Function<String, ?> mappingFunction) {
|
||||
return values.computeIfAbsent(valueId, mappingFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return values list starting with searching key.
|
||||
* <p>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue