mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
[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
|
|
@ -7,7 +7,9 @@ public enum SagaChapter {
|
|||
CHAPTER_I(1, "I"),
|
||||
CHAPTER_II(2, "II"),
|
||||
CHAPTER_III(3, "III"),
|
||||
CHAPTER_IV(4, "IV");
|
||||
CHAPTER_IV(4, "IV"),
|
||||
CHAPTER_V(5, "V"),
|
||||
CHAPTER_VI(6, "VI");
|
||||
|
||||
private final String text;
|
||||
private final int number;
|
||||
|
|
|
|||
|
|
@ -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