Lines Matching defs:Pair
21 import android.util.Pair;
49 // Value (Pair(Long, Integer)): a pair of last log time millis and the number of logMessage.
51 private final HashMap<String, Pair<Long, Integer>> mWarningTimingCache = new HashMap<>();
53 private final HashMap<String, Pair<Long, Integer>> mErrorTimingCache = new HashMap<>();
108 private static String updateLog(HashMap<String, Pair<Long, Integer>> cache, String logMessage) {
110 Pair<Long, Integer> timing = cache.get(logMessage);
113 cache.put(logMessage, new Pair<>(curTime, 1));
121 private static String buildMessage(String message, @Nullable Pair<Long, Integer> timing) {
127 private static void increaseLogCount(HashMap<String, Pair<Long, Integer>> cache,
129 Pair<Long, Integer> timing = cache.get(message);
131 cache.put(message, new Pair<>(timing.first, timing.second + 1));
135 private static boolean shouldLogNow(@Nullable Pair<Long, Integer> timing, long curTime) {