for ( int i = 0; i < list.size( ); i++ ) { PropertyBinding struct = (PropertyBinding) list.get( i );
	private List doCheckStructureList( Module module,			DesignElement element, IPropertyDefn propDefn, List list,			IStructure toAdd )	{		boolean checkList = toAdd == null;		List errorList = new ArrayList( );		if ( list == null || list.size( ) == 0 )			return errorList;		assert propDefn != null;		assert propDefn.getTypeCode( ) == PropertyType.STRUCT_TYPE;		// Get the unique member whose value should be unique in the		// structure list.		// The type of unique member is name property type.		// Note: The first unique member is considered.		PropertyDefn uniqueMember = null;		Iterator iter = propDefn.getStructDefn( ).getPropertyIterator( );		while ( iter.hasNext( ) )		{			PropertyDefn memberDefn = (PropertyDefn) iter.next( );			if ( memberDefn.getTypeCode( ) == PropertyType.NAME_TYPE )			{				uniqueMember = memberDefn;				break;			}		}		HashSet values = new HashSet( );		// Check whether there two structure has the same value of		// the unique member.		for ( int i = 0; i < list.size( ); i++ )		{			Structure struct = (Structure) list.get( i );			if ( checkList )				errorList.addAll( struct.validate( module, element ) );			if ( uniqueMember != null )			{				String value = (String) struct.getProperty( module,						uniqueMember );				if ( values.contains( value ) )				{					if ( checkList )						errorList								.add( new PropertyValueException(										element,										propDefn,										value,										PropertyValueException.DESIGN_EXCEPTION_VALUE_EXISTS ) );				}				else				{					values.add( value );				}			}		}		// If the toAdd structure is added the structure list, check whether		// there is a structure in the list has the same value of the unique		// member.		if ( uniqueMember != null && toAdd != null )		{			String value = (String) toAdd.getProperty( module, uniqueMember );			if ( values.contains( value ) )			{				errorList.add( new PropertyValueException( element, propDefn						.getName( ), value,						PropertyValueException.DESIGN_EXCEPTION_VALUE_EXISTS ) );			}		}		return errorList;	}