Yair Zaslavsky has posted comments on this change. Change subject: core: Introduce BusinessEntityMap ......................................................................
Patch Set 17: (1 comment) http://gerrit.ovirt.org/#/c/33329/17/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BusinessEntityMap.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/BusinessEntityMap.java: Line 9: /** Line 10: * The {@code BusinessEntityMap} class stores a nameable business entities for efficient access by their ID or name.<br> Line 11: * The {@code BusinessEntityMap} ignores {@code null} IDs or {@code null} names to be search by. Line 12: */ Line 13: public class BusinessEntityMap<E extends BusinessEntity<Guid> & Nameable> { More ideas for improvement - have a method called Collection<String> names() - i will let you guess what it does. Same goes for a method called Collection<Guid> ids() And of course a method of values() similar to the one java.util.map has. having an "addAlll" method can be awesome as well. Line 14: private Map<String, E> entitiesByName; Line 15: private Map<Guid, E> entitiesById; Line 16: Line 17: // added for the sake of checkstyle rule -- To view, visit http://gerrit.ovirt.org/33329 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I4540f813f8a787a38ba3e692b6ddd3fcc6be536a Gerrit-PatchSet: 17 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <[email protected]> Gerrit-Reviewer: Alona Kaplan <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
