ExistedScopesStatesAndNonExistNames (final int rowIndex) { final List<String> nonExistNames = new SmartList<>(); final List<ScopeToolState> existedStates = new SmartList<>(); for (final String keyName : myKeyNames) { final ScopeToolState scopeToolState = getScopeToolState(keyName, rowIndex); if (scopeToolState != null) { existedStates.add(scopeToolState); } else { nonExistNames.add(keyName); } } return new ExistedScopesStatesAndNonExistNames(existedStates, nonExistNames); }