All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.unlaxer.tinyexpression.model.CharacterAttributes Maven / Gradle / Ivy

There is a newer version: 1.4.6
Show newest version
package org.unlaxer.tinyexpression.model;

public class CharacterAttributes{
	
	public int attributres;
	public void setAttributes(CharacterAttribute...characterAttributes){
		for (CharacterAttribute characterAttribute : characterAttributes) {
			if(has(characterAttribute)){
				continue;
			}
			attributres += characterAttribute.code;
		}
	}
	public void resetAttributes(CharacterAttribute...characterAttributes){
		for (CharacterAttribute characterAttribute : characterAttributes) {
			if(has(characterAttribute)){
				attributres -= characterAttribute.code;
			}
		}
	}
	public boolean has(CharacterAttribute characterAttribute){
		return (attributres & characterAttribute.code) != 0;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy