private void removeFromCollectionGroup(OpcodeStack.Item itm) { Comparable<?> groupElement = getGroupElement(itm); if (groupElement != null) { for (GroupPair groupPair : collectionGroups) { if (groupPair.containsMember(groupElement)) { groupPair.removeMember(groupElement); break; } } } }
private void removeFromCollectionGroup(OpcodeStack.Item itm) { Comparable<?> groupElement = getGroupElement(itm); if (groupElement != null) { for (GroupPair groupPair : collectionGroups) { if (groupPair.containsMember(groupElement)) { groupPair.removeMember(groupElement); break; } } } }
private int findCollectionGroup(OpcodeStack.Item itm, boolean addIfNotFound) { Integer id = (Integer) itm.getUserValue(); if (id != null) { return id.intValue(); } Comparable<?> groupElement = getGroupElement(itm); if (groupElement == null) { return -1; } int numGroups = collectionGroups.size(); for (int i = 0; i < numGroups; i++) { GroupPair groupPair = collectionGroups.get(i); if (groupPair.containsMember(groupElement)) { return i; } } if (!addIfNotFound) { return -1; } GroupPair groupPair = new GroupPair(groupElement, itm.getSignature()); collectionGroups.add(groupPair); return collectionGroups.size() - 1; }
private int findCollectionGroup(OpcodeStack.Item itm, boolean addIfNotFound) { Integer id = (Integer) itm.getUserValue(); if (id != null) { return id.intValue(); } Comparable<?> groupElement = getGroupElement(itm); if (groupElement == null) { return -1; } int numGroups = collectionGroups.size(); for (int i = 0; i < numGroups; i++) { GroupPair groupPair = collectionGroups.get(i); if (groupPair.containsMember(groupElement)) { return i; } } if (!addIfNotFound) { return -1; } GroupPair groupPair = new GroupPair(groupElement, itm.getSignature()); collectionGroups.add(groupPair); return collectionGroups.size() - 1; }