public DefaultTagDescription clone() { try { final DefaultTagDescription clone = (DefaultTagDescription) super.clone(); clone.tagData = (HashMap<TagDefinitionKey, Boolean>) tagData.clone(); clone.defaultDefinitions = (HashMap<String, Boolean>) defaultDefinitions.clone(); clone.lookupKey = new TagDefinitionKey( null, null ); return clone; } catch ( CloneNotSupportedException e ) { throw new IllegalStateException(); } } }
lookupKey.update( namespace, tagname ); final Object tagVal = tagData.get( lookupKey ); if ( tagVal != null ) {
/** * Adds a configuration entry for the given namespace and tag-name to the tag-descriptions. * * @param namespaceUri the namespace URI for which a default should be configured. * @param tagName the tagname for which the entry should be added. * @param hasCData the default value. */ public void setElementHasCData( final String namespaceUri, final String tagName, final boolean hasCData ) { if ( namespaceUri == null ) { throw new NullPointerException(); } if ( tagName == null ) { throw new NullPointerException(); } tagData.put( new TagDefinitionKey( namespaceUri, tagName ), hasCData ? Boolean.TRUE : Boolean.FALSE ); }
/** * A default-constructor. */ public DefaultTagDescription() { defaultDefinitions = new HashMap<String, Boolean>(); tagData = new HashMap<TagDefinitionKey, Boolean>(); lookupKey = new TagDefinitionKey( null, null ); }
/** * Adds a configuration entry for the given namespace and tag-name to the tag-descriptions. * * @param tagName the tagname for which the entry should be added. * @param hasCData the default value. */ public void setElementHasCData( final String tagName, final boolean hasCData ) { if ( tagName == null ) { throw new NullPointerException(); } tagData.put( new TagDefinitionKey( defaultNamespace, tagName ), hasCData ? Boolean.TRUE : Boolean.FALSE ); }