List of utility methods to do SortedSet
SortedSet | getEntryOrEmptySet(K key, Map get Entry Or Empty Set return (map.containsKey(key) ? map.get(key) : new TreeSet<V>()); |
SortedSet | getFlatItems(Map Get the linked workItemIDs SortedSet<Integer> linkedWorkItemIDsSet = new TreeSet<Integer>(); if (linkedWorkItemIDsMap != null) { Iterator<SortedSet<Integer>> iterator = linkedWorkItemIDsMap.values().iterator(); while (iterator.hasNext()) { linkedWorkItemIDsSet.addAll(iterator.next()); return linkedWorkItemIDsSet; ... |
Set | getSortedIntersectionValues(Collection get Sorted Intersection Values Set<T> set = new TreeSet<>(); set.addAll(getIntersectionValues(colection1, colection2)); return set; |
SortedSet | getSortedTypes(Class>[] types) get Sorted Types final TreeSet<Class<?>> classes = new TreeSet<Class<?>>(CLASS_COMPARATOR); if (types != null) { classes.addAll(asList(types)); return classes; |
SortedSet | intersect(SortedSet Computes a new set, that is the intersection of set1 and set2. SortedSet<E> result = new TreeSet<>(); Iterator<E> it1 = pSet1.iterator(); Iterator<E> it2 = pSet2.iterator(); if (!it1.hasNext()) { return result; if (!it2.hasNext()) { return result; ... |
SortedSet | intersectSorted(final Collection extends T> c1, final Collection extends T> c2) intersect Sorted final SortedSet<T> set = new TreeSet<T>(); for (T t : c1) { if (c2.contains(t)) set.add(t); return set; |
SortedSet | mapToSortedSet(Map map) map To Sorted Set SortedSet result = new TreeSet(); Iterator iter = map.entrySet().iterator(); Map.Entry me; while (iter.hasNext()) { me = (Map.Entry) iter.next(); result.add(me.getValue()); return result; ... |
SortedSet | newSortedSet() new Sorted Set return new TreeSet<T>(); |
int | setDistance(SortedSet s1, SortedSet s2) Set distance TreeSet union = new TreeSet(s1); union.addAll(s2); int sum = 0; Iterator uit = union.iterator(); while (uit.hasNext()) { String unext = (String) uit.next(); int increment = (s1.contains(unext) && s2.contains(unext)) ? 0 : 1; sum += increment; ... |
SortedSet | setminus(SortedSet Computes a new set, that is the setminus of set1 and set2. SortedSet<E> result = new TreeSet<>(); Iterator<E> it1 = pSet1.iterator(); while (it1.hasNext()) { E elem = it1.next(); if (!pSet2.contains(elem)) { result.add(elem); return result; |