1 | /* |
2 | * Copyright 2004-2014 H2 Group. Multiple-Licensed under the MPL 2.0, |
3 | * and the EPL 1.0 (http://h2database.com/html/license.html). |
4 | * Initial Developer: H2 Group |
5 | */ |
6 | package org.h2.bnf; |
7 | |
8 | /** |
9 | * Represents the head of a BNF rule. |
10 | */ |
11 | public class RuleHead { |
12 | private final String section; |
13 | private final String topic; |
14 | private Rule rule; |
15 | |
16 | RuleHead(String section, String topic, Rule rule) { |
17 | this.section = section; |
18 | this.topic = topic; |
19 | this.rule = rule; |
20 | } |
21 | |
22 | public String getTopic() { |
23 | return topic; |
24 | } |
25 | |
26 | public Rule getRule() { |
27 | return rule; |
28 | } |
29 | |
30 | void setRule(Rule rule) { |
31 | this.rule = rule; |
32 | } |
33 | |
34 | public String getSection() { |
35 | return section; |
36 | } |
37 | |
38 | } |