| author | indvdum (gotoindvdum[at]gmail[dot]com) |
| Fri, 13 Jul 2012 21:55:14 +0400 | |
| branch | indvdum |
| changeset 5 | 162341642dd7 |
| child 6 | 0dbbc8983926 |
| permissions | -rw-r--r-- |
1 package ru.bosony.model.cellscontents;
3 import ru.bosony.model.io.TextRepresentable;
5 /**
6 * @author indvdum (gotoindvdum[at]gmail[dot]com) <br>
7 * 13.07.2012 21:25:49
8 *
9 */
10 public abstract class CellContent implements TextRepresentable {
12 @Override
13 public CellContent fromText(String text) {
14 for (CellContent content : new CellContent[] {
15 new ClosedLambdaLift(),
16 new Earth(),
17 new Empty(),
18 new Lambda(),
19 new MiningRobot(),
20 new OpenLambdaLift(),
21 new Rock(),
22 new Wall()
23 }) {
24 if (text != null && text.equals(content.toText()))
25 return content;
26 }
27 return null;
28 }
30 }