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

fr.vergne.translation.util.impl.IdentitySwitcher Maven / Gradle / Ivy

The newest version!
package fr.vergne.translation.util.impl;

import fr.vergne.translation.util.Switcher;

/**
 * An {@link IdentitySwitcher} simply provides a {@link Switcher} which does not
 * change the representation. It is mainly used for cases where you manage in a
 * generic way a set of {@link Switcher}s in which some of them may be useless
 * (no need to switch). Consequently, this {@link Switcher} does not switch
 * anything and just return back the exactly same value.
 * 
 * @author Matthieu VERGNE 
 * 
 * @param 
 */
public class IdentitySwitcher implements Switcher {

	@Override
	public T switchForth(T value) {
		return value;
	}

	@Override
	public T switchBack(T value) {
		return value;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy