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

jadex.micro.testcases.nfproperties.MethodSpeedProperty 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.nfproperties;

import jadex.bridge.nonfunctional.AbstractNFProperty;
import jadex.bridge.nonfunctional.NFPropertyMetaInfo;
import jadex.commons.future.Future;
import jadex.commons.future.IFuture;

/**
 *  Example property returning a String about the method speed.
 * 	This also demonstrates String properties, a real-world
 * 	implementation would probably use a quantifiable measure
 *  like response time.
 */
public class MethodSpeedProperty extends AbstractNFProperty
{
	protected String speed;

	public MethodSpeedProperty()
	{
		super(new NFPropertyMetaInfo("methodspeed", String.class, null, false, -1, false, null));
		speed = "Very fast, indeed!";
	}

//	public IFuture getValue(Class unit)
	public IFuture getValue(Void unit)
	{
		return new Future(speed);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy