List of utility methods to do SortedMap Usage
T | lastElement(List last Element if (isEmpty(c)) { return null; return c.get(c.size() - 1); |
void | pruneStartAndEndKeys(SortedMap prune Start And End Keys for (Map.Entry<Integer, byte[]> entry : setOfStartKeyByteArray.entrySet()) { listOfStartKeyByteArray.add(entry.getValue()); |
void | putWeightToBin(SortedMap put Weight To Bin if (null != hist) { if (hist.containsKey(bin)) { hist.put(bin, hist.get(bin) + weight); } else { hist.put(bin, weight); |
void | removeSetFromBulkLm(Set Removes from the maps of the specified list, the keys of toRemoveSet, except if they match exceptRegex. for (String key : toRemoveSet) { if ((exceptRegex == null) || (!key.matches(exceptRegex))) { for (SortedMap<String, Long> byteSizeByName : byteSizeByNameList) { byteSizeByName.remove(key); |
SortedMap | sortedMapOf(final Object obj, final Class sorted Map Of return (SortedMap<K, V>) obj;
|
SortedMap | submapWithPrefix(SortedMap Returns a living view of the given map containing all strings that starts with the given prefix (including the prefix string itself). if (map.comparator() != null) throw new IllegalArgumentException("only natural (lexiographic) ordering supported"); int length = prefix.length(); if (length == 0) return map; StringBuilder lhs = new StringBuilder(prefix); char ch = lhs.charAt(length - 1); lhs.setCharAt(length - 1, (char) (ch + 1)); ... |
List | unwrapList(SortedMap unwrap List List<V> list = new ArrayList<V>(); list.addAll(sortedMap.tailMap(fromKey).values()); list.addAll(sortedMap.headMap(fromKey).values()); return list; |
List | unwrapList(SortedMap Unwraps a sorted map and creates a list, starting with the element element mapped to the fromKey and then adding all elements after the from key until the end of the map, and then adding all elements from the beginning of the map up to (but not including) the first element. List<V> list = new ArrayList<V>(); list.addAll(sortedMap.tailMap(fromKey).values()); list.addAll(sortedMap.headMap(fromKey).values()); return list; |