All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jadex.micro.testcases.semiautomatic.compositeservice.SubService Maven / Gradle / Ivy

Go to download

The Jadex micro applications package contains several example applications, benchmarks and testcases using micro agents.

There is a newer version: 4.0.267
Show newest version
package jadex.micro.testcases.semiautomatic.compositeservice;

import jadex.bridge.IInternalAccess;
import jadex.bridge.service.BasicService;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;

/**
 *  Simple subtract service.
 */
public class SubService extends BasicService implements ISubService
{
	//-------- constructors --------
	
	/**
	 *  Create a new service.
	 */
	public SubService(IInternalAccess comp)
	{
		super(comp.getComponentIdentifier(), ISubService.class, null);
	}
	
	//-------- methods --------
	
	/**
	 *  Subtract two numbers.
	 *  @param a Number one.
	 *  @param b Number two.
	 *  @return The result of a minus b.
	 */
	public IFuture sub(double a, double b)
	{
		return new Future(Double.valueOf(a-b));
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy