String nickname = temp.getNickname();
if (this.contains(nickname))//The buffer being added is a simple buffer already in this buffer.
{
//System.out.println("Increasing already in there");
DblMatrix current = this.getConcentration(nickname);
current = current.plus(concentration);
this.setConcentration(nickname,current);
}
else
{
BufferSolution testSol = new BufferSolution();
testSol.setConnection(this.connection);
testSol.setRepository(this.repos);
//Create a solution of the buffer in question.
testSol.add(temp,new DblMatrix(concentration));
//HashMap contents = testSol.getContents();
//Set keys = contents.keySet();
//Iterator iter = keys.iterator();
String[] contents = testSol.getComponents();
boolean out = true;
//while (iter.hasNext())
for (int j=0;j<contents.length;j++)
{
String comp = contents[j];
//String comp = (String)iter.next();
//DblMatrix current = (DblMatrix)this.concentrationMap.get(comp);
if (this.summaryBuffer.hasComponent(comp))
{
DblMatrix current = this.summaryBuffer.getEstimatedConcentration(comp);
if (current == null)
{
this.add(comp,testSol.getConcentration(comp));
}
else
{
current = current.plus(testSol.getConcentration(comp));
}
}
else
{
this.add(comp,testSol.getConcentration(comp));