TopLevelFQNames (TopLevelFQNames other) { boolean mergedUseful = useful && other.useful; Set<String> set; if (mergedUseful) { set = new HashSet<>(names); set.addAll(other.names); } else { set = Collections.emptySet(); } return new TopLevelFQNames(timestamp + other.timestamp, set, mergedUseful); }