Here you can find the source of loadTrustSet(String trustSet)
public static Map<String, Map<String, Double>> loadTrustSet(String trustSet) throws Exception
//package com.java2s; //License from project: Open Source License import java.io.BufferedReader; import java.io.FileReader; import java.util.HashMap; import java.util.Map; public class Main { public static Map<String, Map<String, Double>> loadTrustSet(String trustSet) throws Exception { BufferedReader fr = new BufferedReader(new FileReader(trustSet)); Map<String, Map<String, Double>> userTNsMap = new HashMap<>(); String line = null;//w ww. j a v a 2 s . c om Map<String, Double> tns = null; while ((line = fr.readLine()) != null) { if (line.equals("")) continue; String[] data = line.split(" "); String trustor = data[0]; String trustee = data[1]; double trustScore = Double.parseDouble(data[2]); if (trustee.equals(trustor)) continue; // to remove self-indicate entry if (userTNsMap.containsKey(trustor)) tns = userTNsMap.get(trustor); else tns = new HashMap<>(); tns.put(trustee, trustScore); userTNsMap.put(trustor, tns); } fr.close(); return userTNsMap; } }