package br.uem.din.metrics.concernDrivenMetrics.interactionBeteweenConcerns;

import java.util.HashSet;
import java.util.Set;

import br.uem.din.architectureEvolution.representation.Concern;
import br.uem.din.architectureEvolution.representation.Operation;

public class OOBCResult {

	private final Concern concern;
	private final Set<Concern> interlacedConcerns = new HashSet<Concern>();

	public OOBCResult(Concern concern, Operation context){
		this.concern = concern;
		
		addInterlacedConcerns(context);
	}

	public void addInterlacedConcerns(Operation context) {
		getInterlacedConcerns().addAll(context.getConcerns());
		interlacedConcerns.remove(concern);
	}

	public Concern getConcern() {
		return concern;
	}
	
	public Set<Concern> getInterlacedConcerns() {
		return interlacedConcerns;
	}
	
	@Override
	public String toString() {
		return concern.getName() + ": " + getInterlacedConcerns();
	}
}
