(String actionContextValue)
| 60 | } |
| 61 | |
| 62 | public static ActionContext getActionContext(String actionContextValue) throws ValueException { |
| 63 | return switch(actionContextValue) { |
| 64 | case "Fr" -> FREE_SPACE; |
| 65 | case "I" -> INTERCEPTION; |
| 66 | case "HD" -> HEADER; |
| 67 | case "Cnt" -> CONTROL; |
| 68 | case "Mrk" -> MARKED; |
| 69 | case "Pvt" -> PIVOT; |
| 70 | case "Clr" -> CLEARANCE; |
| 71 | case "Pr" -> PRESSED; |
| 72 | case "Tck" -> TACKLING; |
| 73 | case "SP" -> SET_PIECE; |
| 74 | case "Ch" -> CHALLENGE; |
| 75 | case "B" -> BLOCK; |
| 76 | case "FT" -> FIRST_TOUCH; |
| 77 | case "Hld" -> HOLD; |
| 78 | case "Adv" -> ADVANTAGE; |
| 79 | case "Dv" -> DIVE; |
| 80 | default -> throw new ValueException("Could not map action context value"); |
| 81 | }; |
| 82 | } |
| 83 | |
| 84 | public static ActionOutcomeType getActionOutcomeType(String actionOutcomeValue) throws ValueException { |
| 85 | return switch (actionOutcomeValue) { |
no outgoing calls