Code Conventions

This commit is contained in:
m_broelemann 2021-01-06 08:31:27 +01:00
parent e81984fcc1
commit a121811b12

View File

@ -9,23 +9,37 @@ import java.util.List;
*/
public class TestFavorites implements IFAVORITES {
/**
* Liste der favoriten.
*/
private List<String> favorites = new ArrayList<>();
/**
* @return
*/
@Override
public List<String> getFavorites() {
return favorites;
}
/**
* @param deviceName the name of the device to be added
* @return
*/
@Override
public String addFavorite(String deviceName) {
public String addFavorite(final String deviceName) {
if (!favorites.contains(deviceName)) {
favorites.add(deviceName);
}
return deviceName;
}
/**
* @param deviceName the name of the device to be removed
* @return
*/
@Override
public String removeFavorite(String deviceName) {
public String removeFavorite(final String deviceName) {
if (favorites.contains(deviceName)) {
favorites.remove(deviceName);
}