public static void readLine(final String format, final String line, final Map<String, Map<String, Double>> mapMetricUserValue, final Set<String> usersToAvoid) {
        String[] toks = line.split("\t");
        // default (also trec_eval) format: metric \t user|all \t value
        if (format.equals("default")) {
            String metric = toks[0];
            String user = toks[1];
            Double score = Double.parseDouble(toks[2]);
            if (usersToAvoid.contains(user)) {
                return;
            }
            Map<String, Double> userValueMap = mapMetricUserValue.get(metric);
            if (userValueMap == null) {
                userValueMap = new HashMap<String, Double>();
                mapMetricUserValue.put(metric, userValueMap);
            }
            userValueMap.put(user, score);
        }
    }
public static void readLine ( final String format , final String line , final Map < String , Map < String , Double > > mapMetricUserValue , final Set < String > usersToAvoid ) { String [ ] toks = line . split ( "\t" ) ; if ( format . equals ( "default" ) ) { String metric = toks [ 0 ] ; String user = toks [ 1 ] ; Double score = Double . parseDouble ( toks [ 2 ] ) ; if ( usersToAvoid . contains ( user ) ) { return ; } Map < String , Double > userValueMap = mapMetricUserValue . get ( metric ) ; if ( userValueMap == null ) { userValueMap = new HashMap < String , Double > ( ) ; mapMetricUserValue . put ( metric , userValueMap ) ; } userValueMap . put ( user , score ) ; } }
Read a line from the metric file.

@param format The format of the file.
@param line The line.
@param mapMetricUserValue Map where metric values for each user will be
stored.
@param usersToAvoid User ids to be avoided in the subsequent significance
testing (e.g., 'all')