Package uk.co.thomasc.scrapbanktf.util

Examples of uk.co.thomasc.scrapbanktf.util.MutableInt


      final Map<Integer, Byte> classid = new HashMap<Integer, Byte>();
      final Map<Integer, MutableInt> scraped = new HashMap<Integer, MutableInt>();
      try {
        while (result.next()) {
          try {
            count.put(result.getInt("schemaid"), new MutableInt(result.getInt("stk")));
            classid.put(result.getInt("schemaid"), result.getByte("classid"));
            scraped.put(result.getInt("schemaid"), new MutableInt(0));
          } catch (final SQLException e) {
            e.printStackTrace();
          }
        }
      } catch (final SQLException e) {
View Full Code Here


      for (final JSONObject i : (ArrayList<JSONObject>) obj) {
        final int defindex = (int) (long) i.get("defindex");
        if (freq.containsKey(defindex)) {
          freq.get(defindex).increment();
        } else {
          freq.put(defindex, new MutableInt());
        }
      }

      final Map<Integer, MutableInt> sortedFreq = Util.sortHashMapByValues(freq, true);
      for (final Entry<Integer, MutableInt> entry : sortedFreq.entrySet()) {
View Full Code Here

    for (final long child : items.getIds()) {
      final Item item = inv.getItem(child);
      if (response.containsKey(item.defIndex)) {
        response.get(item.defIndex).increment();
      } else {
        response.put(item.defIndex, new MutableInt());
      }
    }
    return response;
  }
View Full Code Here

    if (myCount.containsKey(item.defIndex)) {
      myCount.get(item.defIndex).decrement();
      if (otherCount.containsKey(item.defIndex)) {
        otherCount.get(item.defIndex).increment();
      } else {
        otherCount.put(item.defIndex, new MutableInt());
      }
    }
    bot.toTrade.remove((Integer) item.defIndex);
  }
View Full Code Here

    final ResultSet result = Main.sql.selectQuery("SELECT schemaid, stock - COUNT(reservation.Id) as stk FROM items LEFT JOIN reservation ON items.schemaid = reservation.itemid WHERE highvalue = 2 GROUP BY items.schemaid HAVING stk > 0");
    final Map<Integer, MutableInt> count = new HashMap<Integer, MutableInt>();
    try {
      while (result.next()) {
        count.put(result.getInt("schemaid"), new MutableInt(result.getInt("stk")));
      }
    } catch (final SQLException e) {
      e.printStackTrace();
    }
View Full Code Here

TOP

Related Classes of uk.co.thomasc.scrapbanktf.util.MutableInt

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.