◆ get() [1/2]
Definition at line 41 of file PhaseDefinitions.java.
42 return stream().filter(pd -> pd.getIndex() == index).findFirst().orElse(
null);
◆ get() [2/2]
Definition at line 45 of file PhaseDefinitions.java.
46 return stream().filter(pd -> pd.getName().equals(name)).findFirst().orElse(
null);
◆ getMapping()
int org.turro.phase.PhaseDefinitions.getMapping |
( |
int |
index, |
|
|
String |
serverId |
|
) |
| |
Definition at line 49 of file PhaseDefinitions.java.
50 PhaseDefinition pd =
get(index);
51 if(pd ==
null)
return index;
52 return pd.getMapping().getOrDefault(serverId, index);
◆ instance()
Definition at line 132 of file PhaseDefinitions.java.
133 return INIT.instance(() -> !watch.isNewer(), () ->
load());
static PhaseDefinitions load()
◆ load()
Definition at line 142 of file PhaseDefinitions.java.
143 PhaseDefinitions definitions =
null;
144 if(watch.exists())
try {
146 JSONSerializer ser =
new JSONSerializer(
true);
147 definitions = ser.fromJson(FileUtil.getContent(watch.getFile()), PhaseDefinitions.class);
148 }
catch (IOException ex) {
149 Logger.getLogger(PhaseDefinitions.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
151 if(definitions ==
null) {
152 definitions =
new PhaseDefinitions();
153 definitions.setDefaults();
◆ reset()
static void org.turro.phase.PhaseDefinitions.reset |
( |
| ) |
|
|
static |
The documentation for this class was generated from the following file: