org.unlaxer.tinyexpression.model.CharacterAttribute Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tinyExpression Show documentation
Show all versions of tinyExpression Show documentation
TinyExpression implemented with Unlaxer
The newest version!
package org.unlaxer.tinyexpression.model;
public enum CharacterAttribute{
//color
blue,red,green,highlight,
//like μPD3301
blink,underline,upperline,reverse,secret,//,semiGraphic
//font
italic,bold,
//backColor
blueBack,redBack,greenBack,highlightBack
;
public int code;
private CharacterAttribute() {
this.code = (int)Math.pow(2,ordinal());
if(ordinal()>31){
throw new IllegalStateException("attributes too many");
}
}
}