CopyOnWriteList (@NotNull CopyOnWriteList addList) { CopyOnWriteList newList = new CopyOnWriteList(); List<VariableInfo> list = getList(); newList.list.addAll(list); List<VariableInfo> toAdd = addList.getList(); for (final VariableInfo variableInfo : toAdd) { if (!newList.list.contains(variableInfo)) { // no copy newList.list.add(variableInfo); } } return newList; }