void (String @NotNull [] state) { if (state.length == 0) { myWorkDirectory = ""; myHistory.clear(); } else { myWorkDirectory = state[0]; myHistory.addAll(Arrays.asList(state).subList(1, state.length)); } }