|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunikl.disco.misc.SetUtils
public class SetUtils
A tiny collection of convenience methods useful in dealing with sets but not provided directly by Sun's set classes.
Constructor Summary | |
---|---|
SetUtils()
|
Method Summary | |
---|---|
static java.util.Map |
createMap(java.util.Set set,
java.lang.Object value)
Creates a map containing each element of the Set set as key
and the |
static java.util.Set |
getDifference(java.util.Set s1,
java.util.Set s2)
Returns the set difference between the set s1 and the set s2 . |
static java.util.Set |
getIntersection(java.util.List sets)
Returns the intersection of all sets contained in the list sets . |
static java.util.Set |
getIntersection(java.util.Set s1,
java.util.Set s2)
Returns the intersection of set s1 and set s2 . |
static java.util.Set |
getUnion(java.util.List sets)
Returns the union of all sets contained in the list sets . |
static java.util.Set |
getUnion(java.util.Set s1,
java.util.Set s2)
Returns the union of set s1 and set s2 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SetUtils()
Method Detail |
---|
public static java.util.Set getDifference(java.util.Set s1, java.util.Set s2)
s1
and the set s2
.
s1
- s2
-
public static java.util.Set getIntersection(java.util.Set s1, java.util.Set s2)
s1
and set s2
.
s1
- a sets2
- another set
public static java.util.Set getIntersection(java.util.List sets)
sets
.
sets
- a list of sets
public static java.util.Set getUnion(java.util.Set s1, java.util.Set s2)
s1
and set s2
.
s1
- a sets2
- another set
public static java.util.Set getUnion(java.util.List sets)
sets
.
sets
- a list of sets
public static java.util.Map createMap(java.util.Set set, java.lang.Object value)
Set set
as key
and the
set
- the set whose elements will be the keys of entries in the mapvalue
- the value of each of the map's entries
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |