summaryrefslogtreecommitdiffstats
path: root/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2012-08-18 15:51:55 +0100
committerKHobbits <rob@khobbits.co.uk>2012-08-18 15:51:55 +0100
commit57b5236ba68a9e2e9ebc8d9b90e233986885c35f (patch)
tree4bf502fe1b49a6f6a6a40d37f31a27fbdd8d8a27 /EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java
parent6200505a995fcb333e14d6b1160a0f0af7aef4ec (diff)
downloadEssentials-57b5236ba68a9e2e9ebc8d9b90e233986885c35f.tar
Essentials-57b5236ba68a9e2e9ebc8d9b90e233986885c35f.tar.gz
Essentials-57b5236ba68a9e2e9ebc8d9b90e233986885c35f.tar.lz
Essentials-57b5236ba68a9e2e9ebc8d9b90e233986885c35f.tar.xz
Essentials-57b5236ba68a9e2e9ebc8d9b90e233986885c35f.zip
Removing EssentialsUpdate from 2.9 branch.
Development may be continued in 3.x branch.
Diffstat (limited to 'EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java')
-rw-r--r--EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java57
1 files changed, 0 insertions, 57 deletions
diff --git a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java b/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java
deleted file mode 100644
index 67baf6bb6..000000000
--- a/EssentialsUpdate/src/com/earth2me/essentials/update/states/AbstractYesNoState.java
+++ /dev/null
@@ -1,57 +0,0 @@
-package com.earth2me.essentials.update.states;
-
-
-public abstract class AbstractYesNoState extends AbstractState
-{
- private boolean answer = false;
- private final transient Class<? extends AbstractState> yesState;
- private final transient Class<? extends AbstractState> noState;
-
- public AbstractYesNoState(final StateMap states, final Class<? extends AbstractState> nextState)
- {
- this(states, nextState, nextState);
- }
-
- public AbstractYesNoState(final StateMap states, final Class<? extends AbstractState> yesState, final Class<? extends AbstractState> noState)
- {
- super(states);
- this.yesState = yesState;
- this.noState = noState;
- }
-
- @Override
- public AbstractState getNextState()
- {
- return answer
- ? (yesState == null ? null : getState(yesState))
- : (noState == null ? null : getState(noState));
- }
-
- @Override
- public boolean reactOnAnswer(final String answer)
- {
- if (answer.equalsIgnoreCase("yes")
- || answer.equalsIgnoreCase("y"))
- {
- this.answer = true;
- return true;
- }
- if (answer.equalsIgnoreCase("no")
- || answer.equalsIgnoreCase("n"))
- {
- this.answer = false;
- return true;
- }
- return false;
- }
-
- public boolean getAnswer()
- {
- return answer;
- }
-
- protected void setAnswer(final boolean answer)
- {
- this.answer = answer;
- }
-}