]> gitweb.fperrin.net Git - Dictionary.git/blob - jars/icu4j-52_1/tools/misc/src/com/ibm/icu/dev/tool/layout/ThaiStateTransition.java
Upgrade ICU4J.
[Dictionary.git] / jars / icu4j-52_1 / tools / misc / src / com / ibm / icu / dev / tool / layout / ThaiStateTransition.java
1 /*
2  *******************************************************************************
3  * Copyright (C) 1998-2004, International Business Machines Corporation and    *
4  * others. All Rights Reserved.                                                *
5  *******************************************************************************
6  *
7  * Created on Dec 09, 2003
8  *
9  *******************************************************************************
10  */
11 package com.ibm.icu.dev.tool.layout;
12
13 import java.io.PrintStream;
14
15 public class ThaiStateTransition
16 {
17     int nextState;
18     char action;
19         
20     public ThaiStateTransition(int nextState, char action)
21     {
22         this.nextState = nextState;
23         this.action = action;
24     }
25         
26     public final int getNextState()
27     {
28         return nextState;
29     }
30         
31     public final char getAction()
32     {
33         return action;
34     }
35         
36     public final void setNextState(int newNextState)
37     {
38         nextState = newNextState;
39     }
40         
41     public final void setAction(char newAction)
42     {
43         action = newAction;
44     }
45
46     public String toString()
47     {
48         return ((nextState < 10) ? "0" : "") + nextState + "/" + action + " ";
49     }
50     
51     public void write(PrintStream output)
52     {
53         output.print("{");
54         
55         if (nextState < 10) {
56             output.print(" ");
57         }
58         
59         output.print(nextState);
60         
61         output.print(", t");
62         output.print(action);
63         output.print("}");
64     }
65     
66 }