I'm facing an issue with the below code. Can anyone help me to fix the issue.
Error : Error: Compile Error: Comparison arguments must be compatible types: String, List at line 30 column 20
Error line :
If(brick.ZTS_EU_Market__c == marketlst){
public class ZIP_TerritoryBrickCodePopulation{
public void territoryBrickCodePopulation(List<Account> accList){
String marketValue = system.label.BrickToTerritory_Market;
List<String> marketlst = marketValue.split(',');
Set<String> zipcodes=new Set<String>();
Set<String> marketSet = new Set<String>();
Set<String> zipMarketKey =new Set<String>();
List<ZTS_GL_BrickToTerr__c> lstBrick = [select Id,Name,ZTS_EU_Market__c,ZTS_EU_BrickName__c,ZTS_EU_Territory__c from ZTS_GL_BrickToTerr__c];
for(Account acc:accList){
for(ZTS_GL_BrickToTerr__c brick : lstBrick){
If(brick.ZTS_EU_Market__c == marketlst){
if(!String.isBlank(acc.ZTS_EU_Zip_Postal_Code__c) && acc.ZTS_EU_Market__c != ZTS_EU_GlobalConstants.MARKET_VAL && acc.ZTS_EU_Market__c != ZTS_EU_GlobalConstants.UK_MARKET_VAL){
zipcodes.add(acc.ZTS_EU_Zip_Postal_Code__c);
}else if(acc.ZTS_EU_Market__c == ZTS_EU_GlobalConstants.MARKET_VAL){
zipcodes.add(acc.ZTS_EU_State_County_Value__c);
}else if(!String.isBlank(acc.ZTS_EU_Zip_Postal_Code__c) && acc.ZTS_EU_Market__c == ZTS_EU_GlobalConstants.UK_MARKET_VAL){
zipcodes.add(acc.ZTS_EU_UK_PC4_from_Postalcode__c);
}
marketSet.add(acc.ZTS_EU_Market__c);
}
}
}
}
}
Thanks In advance, Raghu