MatchResult (@NotNull String typedVar) { // @todo this could be performance bottleneck, replace with hash lookup! for (int i = 0, size = myChildren.size(); i < size; i++) { final MatchResult child = myChildren.get(i); if (typedVar.equals(child.getName())) { myChildren.remove(i); return child; } } return null; }