private static Optional < String > getColumnLocalityGroup ( String columnName , Optional < Map < String , Set < String > > > groups ) { if ( groups . isPresent ( ) ) { for ( Map . Entry < String , Set < String > > group : groups . get ( ) . entrySet ( ) ) { if ( group . getValue ( ) . contains ( columnName . toLowerCase ( Locale . ENGLISH ) ) ) { return Optional . of ( group . getKey ( ) ) ; } } } return Optional . empty ( ) ; }
Searches through the given locality groups to find if this column has a locality group .