The list of methods to do SortedMap Usage are organized into topic(s).
List
computePathCauselessLms( List>> depCausesByNameList)
Removes the causes.
final List<String> nameList = new ArrayList<String>();
final int size = depCausesByNameList.size();
for (int i = 0; i < size; i++) {
final SortedMap<String, SortedSet<String>> depCausesByName = depCausesByNameList.get(i);
if (depCausesByName.size() != 1) {
throw new IllegalArgumentException("map size must be 1, but map is " + depCausesByName);
final String name = depCausesByName.firstKey();
...
SortedMap
filterPrefix(SortedMap baseMap, String prefix)
filter Prefix
if (prefix.length() > 0) {
char nextLetter = (char) (prefix.charAt(prefix.length() - 1) + 1);
String end = prefix.substring(0, prefix.length() - 1) + nextLetter;
return baseMap.subMap(prefix, end);
return baseMap;
String
generatePropertiesFilter(SortedMap propertiesMap) Generate a Filter as a String given a Map of property/value pairs.
if (propertiesMap.size() == 1) {
return "(" + propertiesMap.firstKey() + "=" + propertiesMap.get(propertiesMap.firstKey()) + ")";
} else if (propertiesMap.size() > 1) {
return "(&"
+ generatePropertiesFilter(
propertiesMap.subMap(propertiesMap.firstKey(), propertiesMap.firstKey() + "0円"))
+ generatePropertiesFilter(propertiesMap.tailMap(propertiesMap.firstKey() + "0円")) + ")";
return "";
List
getAll(SortedMap map)
Given a sorted map with integer keys and entries of type T[] , this method returns a list of all entries of type T in the induced ordering.
List<T> array = new ArrayList<T>();
for (int i : map.keySet()) {
T[] entry = map.get(i);
for (T t : entry) {
array.add(t);
return array;
...
boolean
isCollectionClass(Class> clazz) is Collection Class
return clazz == Collection.class || clazz == java.util.List.class || clazz == java.util.Set.class
|| clazz == java.util.Map.class || clazz == java.util.SortedSet.class
|| clazz == java.util.SortedMap.class;