public final class SetTools
extends java.lang.Object
Constructor and Description |
---|
SetTools() |
Modifier and Type | Method and Description |
---|---|
static boolean |
anymatch(HandleSet set1,
HandleSet set2)
test if the intersection of two sets is not empty
|
static <A> boolean |
anymatch(java.util.SortedSet<A> set1,
java.util.SortedSet<A> set2)
test if the intersection of two sets is not empty
|
private static boolean |
anymatchByEnumeration(HandleSet set1,
HandleSet set2) |
private static <A> boolean |
anymatchByEnumeration(java.util.SortedSet<A> set1,
java.util.SortedSet<A> set2) |
private static boolean |
anymatchByTest(HandleSet small,
HandleSet large) |
static <A> boolean |
anymatchByTest(java.util.Iterator<A> small,
java.util.SortedSet<A> large) |
static <A,B> void |
excludeDestructive(java.util.Map<A,B> map,
java.util.Set<A> set) |
static <A> void |
excludeDestructive(java.util.Set<A> set1,
java.util.Set<A> set2) |
static <A> void |
excludeDestructiveByTestLargeInSmall(java.util.Set<A> large,
java.util.Collection<A> small) |
private static <A,B> void |
excludeDestructiveByTestMapInSet(java.util.Map<A,B> map,
java.util.Set<A> set) |
private static <A,B> void |
excludeDestructiveByTestSetInMap(java.util.Map<A,B> map,
java.util.Set<A> set) |
static <A> void |
excludeDestructiveByTestSmallInLarge(java.util.Collection<A> small,
java.util.Set<A> large) |
static <A,B> java.util.SortedMap<A,B> |
joinConstructive(java.util.Collection<java.util.SortedMap<A,B>> maps,
boolean concatStrings) |
static <A,B> java.util.SortedMap<A,B> |
joinConstructive(java.util.SortedMap<A,B> map1,
java.util.SortedMap<A,B> map2,
boolean concatStrings) |
static <A> java.util.SortedSet<A> |
joinConstructive(java.util.SortedSet<A> set1,
java.util.SortedSet<A> set2) |
private static <A,B> java.util.SortedMap<A,B> |
joinConstructiveByEnumeration(java.util.SortedMap<A,B> map1,
java.util.SortedMap<A,B> map2,
boolean concatStrings) |
private static <A> java.util.SortedSet<A> |
joinConstructiveByEnumeration(java.util.SortedSet<A> set1,
java.util.SortedSet<A> set2) |
static <A> java.util.SortedSet<A> |
joinConstructiveByTest(java.util.Iterator<A> small,
java.util.SortedSet<A> large) |
private static <A,B> java.util.SortedMap<A,B> |
joinConstructiveByTest(java.util.SortedMap<A,B> small,
java.util.SortedMap<A,B> large,
boolean concatStrings) |
static java.util.SortedSet<java.lang.String> |
loadList(java.io.File file,
java.util.Comparator<java.lang.String> c) |
static java.util.SortedMap<java.lang.String,java.lang.String> |
loadMap(java.lang.String filename,
java.lang.String sep) |
static java.util.SortedMap<java.lang.String,java.util.List<java.lang.String>> |
loadMapMultiValsPerKey(java.lang.String filename,
java.lang.String sep) |
static int |
log2a(int x) |
static void |
main(java.lang.String[] args) |
static java.lang.Object |
nth(java.util.Collection<?> c,
int n) |
static java.lang.String |
setToString(HandleSet set,
char separator) |
static java.lang.String |
setToString(java.util.Set<java.lang.String> set,
char separator) |
static boolean |
totalInclusion(HandleSet small,
HandleSet large)
test if one set is totally included in another set
|
static <A> boolean |
totalInclusion(java.util.Iterator<A> small,
java.util.Set<A> large)
test if one set is totally included in another set
|
public static int log2a(int x)
public static <A,B> java.util.SortedMap<A,B> joinConstructive(java.util.Collection<java.util.SortedMap<A,B>> maps, boolean concatStrings)
public static <A,B> java.util.SortedMap<A,B> joinConstructive(java.util.SortedMap<A,B> map1, java.util.SortedMap<A,B> map2, boolean concatStrings)
private static <A,B> java.util.SortedMap<A,B> joinConstructiveByTest(java.util.SortedMap<A,B> small, java.util.SortedMap<A,B> large, boolean concatStrings)
private static <A,B> java.util.SortedMap<A,B> joinConstructiveByEnumeration(java.util.SortedMap<A,B> map1, java.util.SortedMap<A,B> map2, boolean concatStrings)
public static <A> java.util.SortedSet<A> joinConstructive(java.util.SortedSet<A> set1, java.util.SortedSet<A> set2)
public static <A> java.util.SortedSet<A> joinConstructiveByTest(java.util.Iterator<A> small, java.util.SortedSet<A> large)
private static <A> java.util.SortedSet<A> joinConstructiveByEnumeration(java.util.SortedSet<A> set1, java.util.SortedSet<A> set2)
public static <A> boolean totalInclusion(java.util.Iterator<A> small, java.util.Set<A> large)
A
- small
- large
- public static boolean totalInclusion(HandleSet small, HandleSet large)
small
- large
- public static <A> boolean anymatch(java.util.SortedSet<A> set1, java.util.SortedSet<A> set2)
A
- set1
- set2
- public static boolean anymatch(HandleSet set1, HandleSet set2)
set1
- set2
- public static <A> boolean anymatchByTest(java.util.Iterator<A> small, java.util.SortedSet<A> large)
private static <A> boolean anymatchByEnumeration(java.util.SortedSet<A> set1, java.util.SortedSet<A> set2)
public static <A,B> void excludeDestructive(java.util.Map<A,B> map, java.util.Set<A> set)
private static <A,B> void excludeDestructiveByTestMapInSet(java.util.Map<A,B> map, java.util.Set<A> set)
private static <A,B> void excludeDestructiveByTestSetInMap(java.util.Map<A,B> map, java.util.Set<A> set)
public static <A> void excludeDestructive(java.util.Set<A> set1, java.util.Set<A> set2)
public static <A> void excludeDestructiveByTestSmallInLarge(java.util.Collection<A> small, java.util.Set<A> large)
public static <A> void excludeDestructiveByTestLargeInSmall(java.util.Set<A> large, java.util.Collection<A> small)
public static java.util.SortedMap<java.lang.String,java.lang.String> loadMap(java.lang.String filename, java.lang.String sep)
public static java.util.SortedMap<java.lang.String,java.util.List<java.lang.String>> loadMapMultiValsPerKey(java.lang.String filename, java.lang.String sep)
public static java.util.SortedSet<java.lang.String> loadList(java.io.File file, java.util.Comparator<java.lang.String> c)
public static java.lang.String setToString(HandleSet set, char separator)
public static java.lang.String setToString(java.util.Set<java.lang.String> set, char separator)
public static java.lang.Object nth(java.util.Collection<?> c, int n)
public static void main(java.lang.String[] args)