private static Prefix getPrefix ( final String string , final Set < Prefix > set ) { for ( final Iterator < Prefix > iter = set . iterator ( ) ; iter . hasNext ( ) ; ) { final Prefix prefix = iter . next ( ) ; final int comp = prefix . compareTo ( string ) ; if ( comp == 0 ) { return prefix ; } if ( comp > 0 ) { break ; } } return null ; }
Returns the prefix from the given set with the given identifier .