예제 #1
0
 public void nextStage() {
   if (s != null) {
     s = s.nextStage(this);
     if (s != null) {
       s.apply(this);
     }
   }
 }
예제 #2
0
 public void turnOff() {
   s = Stage.DYING1;
   s.apply(this);
 }
예제 #3
0
 public void turnOn() {
   s = Stage.SPAWNING;
   s.apply(this);
 }
예제 #4
0
 @Override
 public <R> XStream<R> pipe(final Stage<T, R> stage) {
   return new XStreamImpl<>(stage.apply(stream));
 }