01: /*
02: *******************************************************************************
03: * Copyright (C) 1998-2004, International Business Machines Corporation and *
04: * others. All Rights Reserved. *
05: *******************************************************************************
06: *
07: * Created on Dec 09, 2003
08: *
09: *******************************************************************************
10: */
11: package com.ibm.icu.dev.tool.layout;
12:
13: import java.io.PrintStream;
14:
15: public class ThaiStateTransition {
16: int nextState;
17: char action;
18:
19: public ThaiStateTransition(int nextState, char action) {
20: this .nextState = nextState;
21: this .action = action;
22: }
23:
24: public final int getNextState() {
25: return nextState;
26: }
27:
28: public final char getAction() {
29: return action;
30: }
31:
32: public final void setNextState(int newNextState) {
33: nextState = newNextState;
34: }
35:
36: public final void setAction(char newAction) {
37: action = newAction;
38: }
39:
40: public String toString() {
41: return ((nextState < 10) ? "0" : "") + nextState + "/" + action
42: + " ";
43: }
44:
45: public void write(PrintStream output) {
46: output.print("{");
47:
48: if (nextState < 10) {
49: output.print(" ");
50: }
51:
52: output.print(nextState);
53:
54: output.print(", t");
55: output.print(action);
56: output.print("}");
57: }
58:
59: }
|