package Ġstate Ċ Ċ class ĠAction State ( override Ġval Ġstate : ĠString , Ġoverride Ġval Ġordering : ĠInt ) Ġ: ĠComparable < Action State >, ĠState ( state , Ġordering ) Ġ{ ĊĊĠĠĠ Ġcompanion Ġobject Ġ{ ĊĠĠĠĠĠĠĠ Ġval ĠAction Queue Ġ= ĠAction State (" action Queue ", Ġ 1 ) ĊĠĠĠĠĠĠĠ Ġval ĠAction Prepare Ġ= ĠAction State (" action Prepare ", Ġ 2 ) ĊĠĠĠĠĠĠĠ Ġval ĠAction Execute Ġ= ĠAction State (" action Execute ", Ġ 3 ) ĊĠĠĠĠĠĠĠ Ġval ĠAction Recover Ġ= ĠAction State (" action Recover ", Ġ 4 ) ĊĠĠĠĠĠĠĠ Ġval ĠAction State None Ġ= ĠAction State (" action State None ", Ġ 0 ) ĊĊĠĠĠĠĠĠĠ Ġval ĠIn Process Ġ= ĠlistOf ( Action Prepare , ĠAction Execute , ĠAction Recover ) ĊĠĠĠĠĠĠĠ Ġval ĠInterrupt able Ġ= ĠlistOf ( Action Prepare , ĠAction Execute , ĠAction Recover ) ĊĠĠĠĠĠĠĠ Ġval ĠPre emp table Ġ= ĠlistOf ( Action Prepare ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠtoString () Ġ= Ġ"${ Action State :: class . simple Name } ($ state )" ĊĊĠĠĠ Ġoverride Ġfun Ġcompare To ( other : ĠAction State ): ĠInt Ġ= Ġthis . ordering . compareTo ( other . ordering ) Ċ Ċ } Ċ