コード例 #1
0
ファイル: Door2.java プロジェクト: janecms/bookcodes
 /** @return a textual description of the door's state */
 public String status() {
   return state.status();
 }
コード例 #2
0
ファイル: Door2.java プロジェクト: janecms/bookcodes
 /**
  * This is a notification from the mechanical carousel that the door finished opening or shutting.
  */
 public void complete() {
   state.complete();
 }
コード例 #3
0
ファイル: Door2.java プロジェクト: janecms/bookcodes
 /** This is a notification from the mechanical carousel that the door got tired of being open. */
 public void timeout() {
   state.timeout();
 }
コード例 #4
0
ファイル: Door2.java プロジェクト: janecms/bookcodes
 /**
  * The carousel user has touched the carousel button. This "one touch" button elicits different
  * behaviors, depending on the state of the door.
  */
 public void touch() {
   state.touch();
 }