• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*******************************************************************************
2  * Copyright (c) 2009, 2021 Mountainminds GmbH & Co. KG and Contributors
3  * This program and the accompanying materials are made available under
4  * the terms of the Eclipse Public License 2.0 which is available at
5  * http://www.eclipse.org/legal/epl-2.0
6  *
7  * SPDX-License-Identifier: EPL-2.0
8  *
9  * Contributors:
10  *    Marc R. Hoffmann - initial API and implementation
11  *
12  *******************************************************************************/
13 package org.jacoco.examples.expressions;
14 
15 public class Sub implements IExpression {
16 
17 	private final IExpression l;
18 
19 	private final IExpression r;
20 
Sub(final IExpression l, final IExpression r)21 	public Sub(final IExpression l, final IExpression r) {
22 		this.l = l;
23 		this.r = r;
24 	}
25 
evaluate()26 	public double evaluate() {
27 		return l.evaluate() - r.evaluate();
28 	}
29 
30 }
31