int (TokenSet types, List<? extends StubElement> childrenStubs) { int count = 0; for (int i = 0, childrenStubsSize = childrenStubs.size(); i < childrenStubsSize; i++) { StubElement<?> childStub = childrenStubs.get(i); if (types.contains(childStub.getStubType())) count++; } return count; }