private boolean checkApiKey ( final MapType mapTypeToCheck ) { switch ( requireNonNull ( mapTypeToCheck ) ) { case BINGMAPS_ROAD : case BINGMAPS_AERIAL : return bingMapsApiKey . isPresent ( ) ; default : return true ; } }
checks if the given map type needs an api key and if so if it is set .