コード例 #1
0
  public static ArrayList<Entry<String, Integer>> countByTitle()
      throws ClientHandlerException, UniformInterfaceException, JSONException {
    Set<String> titleArray = Statics.getAllTitle();
    Iterator<String> itTitle = titleArray.iterator();
    String title = new String();

    Map<String, Integer> orderTitle = new HashMap<String, Integer>();
    while (itTitle.hasNext()) {
      title = itTitle.next();
      Map<String, String> userStatistics = Statics.getUserList(title);
      String userNumber = userStatistics.get("userNumber");
      Integer userNum = Integer.parseInt(userNumber);
      orderTitle.put(title, userNum);
    }
    ArrayList<Entry<String, Integer>> l = order(orderTitle);

    return l;
  }
コード例 #2
0
 public static Map<String, String> getUserListByTitle(String title)
     throws ClientHandlerException, UniformInterfaceException, JSONException {
   Map<String, String> userStatistics = Statics.getUserList(title);
   return userStatistics;
 }