/** * Setter for property {@code properties}. * * @param value the new collection of properties. * * @throws DuplicatePropertyException if {@code value} contains duplicate * properties. */ public void setProperties( final Property[] value ) { this.names.clear(); this.hashCode = 0; this.properties = null; if ( value != null ) { for ( int i = value.length - 1; i >= 0; i-- ) { this.hashCode += value[i].hashCode(); if ( this.names.put( value[i].getName(), value[i] ) != null ) { this.names.clear(); this.hashCode = 0; throw new DuplicatePropertyException( value[i].getName() ); } } this.properties = value; } }