Bit Field

public class Text {
		public static final int STYLE_BOLD = 1 << 0;
		public static final int STYLE_ITALIC = 1 << 1;
		public static final int STYLE_UNDERLINE = 1 << 2;
		public static final int STYLE_STRIKETHROUGH = 1 << 3;
		
		public void apply(int styles) {
				...
		}
}
public class Text {
		public enum Style 
				BOLD, ITALIC , UNDERLINE, STRIKETHROUGH;
		}
		
		public void apply(Set<Style> styles){...}
}

public class Client {
		public static void main(String[] args) {
				Text text = new Text();
				
				text.apply(EnumSet.of(Style.BOLD. Style.ITALIC));
		}
}