public void addProperty(String name, String value) {
        if (name == null || name.trim().length() == 0) {
            throw new IllegalArgumentException("A property name must be specified.");
        }

        if (value == null || value.trim().length() == 0) {
            throw new IllegalArgumentException("A property value must be specified.");
        }

        properties.put(name, value);
    }
public void addProperty ( String name , String value ) { if ( name == null || name . trim ( ) . length ( ) == 0 ) { throw new IllegalArgumentException ( "A property name must be specified." ) ; } if ( value == null || value . trim ( ) . length ( ) == 0 ) { throw new IllegalArgumentException ( "A property value must be specified." ) ; } properties . put ( name , value ) ; }
Adds a name-value pair property to this element.

@param name      the name of the property
@param value     the value of the property