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

org.javasimon.SimonConfiguration Maven / Gradle / Ivy

The newest version!
package org.javasimon;

/**
 * Stores configuration for the particular Simon or the set of Simons.
 * Currently it holds only the state of the Simon.
 *
 * @author Richard "Virgo" Richter
 */
public final class SimonConfiguration {
	private SimonState state;

	/**
	 * Creates SimonConfiguration item.
	 *
	 * @param state preferred state - SimonManager sets inherit if null is specified here
	 */
	SimonConfiguration(SimonState state) {
		this.state = state;
	}

	/**
	 * Returns Simon state for this configuration item.
	 *
	 * @return configured Simon state or null if nothing was specified
	 */
	public SimonState getState() {
		return state;
	}

	/**
	 * Returns configuration information about Simon (stat processor type and state) as a human readable string.
	 *
	 * @return configuration information about Simon as string
	 */
	@Override
	public String toString() {
		return "SimonConfiguration {\n" +
			"  state=" + state + "\n" +
			"}";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy