CopyOnWriteList (@NotNull VariableInfo value) { CopyOnWriteList newList = new CopyOnWriteList(); List<VariableInfo> list = getList(); for (final VariableInfo variableInfo : list) { if (!value.equals(variableInfo)) { newList.list.add(variableInfo); } } newList.list.add(value); return newList; }