1 /*******************************************************************************
2  * Copyright (c) 2009, 2018 Mountainminds GmbH & Co. KG and Contributors
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  *    Marc R. Hoffmann - initial API and implementation
10  *
11  *******************************************************************************/
12 package org.jacoco.examples.expressions;
13 
14 public class Add implements IExpression {
15 
16 	private final IExpression l;
17 
18 	private final IExpression r;
19 
Add(final IExpression l, final IExpression r)20 	public Add(final IExpression l, final IExpression r) {
21 		this.l = l;
22 		this.r = r;
23 	}
24 
evaluate()25 	public double evaluate() {
26 		return l.evaluate() + r.evaluate();
27 	}
28 
29 }
30