1 42 43 package org.jfree.xml.attributehandlers; 44 45 49 public class BooleanAttributeHandler implements AttributeHandler { 50 51 54 public BooleanAttributeHandler() { 55 super(); 56 } 57 58 65 public String toAttributeValue(final Object o) { 66 if (o instanceof Boolean ) { 67 return o.toString(); 68 } 69 throw new ClassCastException ("Give me a real type."); 70 } 71 72 79 public Object toPropertyValue(final String s) { 80 return new Boolean (s); 81 } 82 } 83 | Popular Tags |