List of usage examples for javax.swing.text AttributeSet containsAttribute
public boolean containsAttribute(Object name, Object value);
From source file:Main.java
private void listAttributes(AttributeSet attributes) { Enumeration e = attributes.getAttributeNames(); while (e.hasMoreElements()) { Object name = e.nextElement(); Object value = attributes.getAttribute(name); if (!attributes.containsAttribute(name.toString(), value)) { System.out.println("containsAttribute() fails"); }/* w ww.ja va 2s .c o m*/ if (!attributes.isDefined(name.toString())) { System.out.println("isDefined() fails"); } System.out.println(name + "=" + value); } }