1 package org.catacomb.druid.xtext.base;
2
3
4 public class Block extends DMItem {
5
6 public String idInParent;
7
8 Block nextBlock;
9 Block previousBlock;
10
11
12
13 public Block() {
14 idInParent = "none";
15 }
16
17
18 public void setNext(Block b) {
19 nextBlock = b;
20 nextBlock.setPrevious(this);
21 }
22
23 public boolean hasNext() {
24 return (nextBlock != null);
25 }
26
27 public Block next() {
28 return nextBlock;
29 }
30
31
32 private void setPrevious(Block b) {
33 previousBlock = b;
34 }
35
36 public boolean hasPrevious() {
37 return (previousBlock != null);
38 }
39
40 public Block previous() {
41 return previousBlock;
42 }
43 }