• [deleted]
    + 2 comments
    private static boolean checkTect(String text) {
    
            int numberOfCharacters = 26;
            Set<String> characters = new HashSet<>();
    
            String regexp = "[a-zA-Z]";
            Pattern pattern = Pattern.compile(regexp);
            Matcher matcher = pattern.matcher(text);
    
            int index = 0;
            boolean foundAll = false;
            
            while (matcher.find() && !foundAll) {
                String s = matcher.group().toLowerCase();
                characters.add(s);
                if (characters.size() == numberOfCharacters) {
                    foundAll = true;
                }
                index++;
            }
    
            return foundAll;
        }