annotate src/alice/datasegment/KeyCommand.java @ 100:b01fb5090e28 working

add default code to each case statements
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Thu, 28 Jun 2012 01:50:29 +0900
parents 1d4f2b72fb31
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
69
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 package alice.datasegment;
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 public class KeyCommand {
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 DataSegmentKey key;
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 Command cmd;
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 public KeyCommand(DataSegmentKey key, Command cmd) {
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 this.key = key;
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 this.cmd = cmd;
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 }
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 public void runCommand() {
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 key.runCommand(cmd);
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 }
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16
1d4f2b72fb31 delete KeyThread
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 }