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

pl.setblack.airomem.core.Command Maven / Gradle / Ivy

The newest version!
/* Copyright (c) Jarek Ratajski, Licensed under the Apache License, Version 2.0
 * http://www.apache.org/licenses/LICENSE-2.0 */
package pl.setblack.airomem.core;

/**
 * Command interface without context.
 * 

* Enclose all operations that mutate system in commands. This can be easily * achieved with lambdas : *

* Command cmd = system -> system.doSomething(); * * @author jarekr */ @FunctionalInterface public interface Command extends ContextCommand { @Override default R execute(T system, PrevalanceContext context) { return this.execute(system); } /** * This operation will be exectued on system. * * @param system - reference to mutable system */ R execute(T system); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy