org.unlaxer.sample.calc.model.ActionType Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of calculator Show documentation
Show all versions of calculator Show documentation
a simple parser combinator inspired by RelaxNG
package org.unlaxer.sample.calc.model;
import org.unlaxer.EnclosureDirection;
public enum ActionType{
// modify formula
backSpace,
delete,
insert,
// position
cursorRight,
cursorLeft,
home,
end,
// select
selectEnclosureOuter,
selectEnclosureInner,
// history
initialized,
addCalculateHistory
;
public static ActionType of(EnclosureDirection enclosureDirection) {
return enclosureDirection.isInner() ? selectEnclosureInner : selectEnclosureOuter;
}
}