/**
 * Copyright 2018 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.google.homegraph.dashboard.model;

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

public class Device {
	private String id;
	private String type;
	private String name;
	private List<String> nicknames = new ArrayList<>();
	private Map<String, Object> statesCache = new HashMap<>();
	private Collection<String> states;
	private boolean updated;

	public boolean isUpdated() {
		return updated;
	}

	public void setUpdated(boolean updated) {
		this.updated = updated;
	}

	public Collection<String> getStates() {
		 states = statesCache.entrySet()
				 .parallelStream()
				 .map(entry -> entry.getValue().toString())
				 .collect(Collectors.toList());
		 return states;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Map<String, Object> getStatesCache() {
		return statesCache;
	}

	public void setStatesCache(Map<String, Object> states) {
		this.statesCache = states;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public List<String> getNicknames() {
		return nicknames;
	}

	public void setNicknames(List<String> nicknames) {
		this.nicknames = nicknames;
	}

}

@@ -1060,44 +1060,8 @@
 ();%0A
-%09private Collection%3CString%3E states;%0A
 %09pri
@@ -1212,213 +1212,8 @@
 %09%7D%0A%0A
-%09public Collection%3CString%3E getStates() %7B%0A%09%09 states = statesCache.entrySet()%0A%09%09%09%09 .parallelStream()%0A%09%09%09%09 .map(entry -%3E entry.getValue().toString())%0A%09%09%09%09 .collect(Collectors.toList());%0A%09%09 return states;%0A%09%7D%0A%0A
 %09pub

Remove unusued method in Device class