public static Set < Alphabet < ? > > possibleAlphabets ( String string ) { HashSet < Alphabet < ? > > alphabets = new HashSet <> ( ) ; for ( Alphabet alphabet : Alphabets . getAll ( ) ) { if ( belongsToAlphabet ( alphabet , string ) ) alphabets . add ( alphabet ) ; } return alphabets ; }
Returns a set of possible alphabets for a given string .