|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsc.utils.SetUtils
public class SetUtils
Utility class offering various methods to manipulate and search in Lists.
| Method Summary | |
|---|---|
static void |
addAllIfNotPresent(Set<Object> set,
Set<?> values)
|
static Set<Object> |
attributeToSet(Attribute attr)
Return a new HashSet containing all the Objects that are an Attribute's values. |
static boolean |
doSetsMatch(Set<Object> srcAttrValues,
Set<Object> dstAttrValues)
Compare two lists of values to see if they contain the same values. |
static Set<?> |
findMissingNeedles(Set<?> haystack,
Set<?> needles)
Find missing needles from a haystack. |
static boolean |
setContainsAll(Set<Object> haystack,
Set<Object> needles)
Check to make sure all needles are in the haystack. |
static Attribute |
setToAttribute(String attrName,
Set<?> values)
Return an Attribute containing all the Objects that are in a Set. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Set<Object> attributeToSet(Attribute attr)
throws NamingException
attr - An Attribute containing values to extract.
HashSet
public static Attribute setToAttribute(String attrName,
Set<?> values)
attrName - The name of the attribute to returnvalues - Values as a set
public static Set<?> findMissingNeedles(Set<?> haystack,
Set<?> needles)
haystack - Set of Objects to find the needles in.needles - Set of Objects to search for in the haystack.
Set of needles that are not in the haystack.
public static boolean setContainsAll(Set<Object> haystack,
Set<Object> needles)
haystack - Set of Objects to find the needles in.needles - Set of Objects to search for in the haystack.
public static boolean doSetsMatch(Set<Object> srcAttrValues,
Set<Object> dstAttrValues)
srcAttrValues - dstAttrValues -
public static void addAllIfNotPresent(Set<Object> set,
Set<?> values)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||