
fr.vergne.translation.util.impl.IdentitySwitcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of translation-core Show documentation
Show all versions of translation-core Show documentation
Basic features to support a translation project.
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