|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectSetComparison
public class SetComparison
Provides two naive methods for removing non-maximal and non-minimal members of collections-of-collections.
The methods simply use containsAll(Collection<?>)
to
compare collections, so their effects depend on the types of the members of the collections. The methods would have
no effect on, for instance, a collection of sets-of-arrays
{ {[obj0
, obj1
]}, {[obj0
, obj1
], [obj1
, obj0
]} }, if the two
references to '[obj0
, obj1
]' were not to one and the same object.
Constructor Summary | |
---|---|
SetComparison()
|
Method Summary | ||
---|---|---|
static
|
removeNonMaximalMembersOf(Collection<T> collColl)
Removes collColl 's non-maximal members, simply using
containsAll(Collection<?>) to compare the collections. |
|
static
|
removeNonMinimalMembersOf(Collection<T> collColl)
Removes collColl 's non-minimal members, simply using
containsAll(Collection<?>) to compare the collections. |
|
private static
|
removeNonMinimalOrNonMaximalHelper(Collection<T> collColl,
boolean removeNonMinimal)
Removes collColl 's non-minimal/non-maximal members, simply using
containsAll(Collection<?>) to compare the collections. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SetComparison()
Method Detail |
---|
public static <T extends Collection> boolean removeNonMinimalMembersOf(Collection<T> collColl)
collColl
's non-minimal members, simply using
containsAll(Collection<?>)
to compare the collections.
collColl
- a Collection
of Collection
s.
true
if collColl
changed as a result of the call.public static <T extends Collection> boolean removeNonMaximalMembersOf(Collection<T> collColl)
collColl
's non-maximal members, simply using
containsAll(Collection<?>)
to compare the collections.
collColl
- a Collection
of Collection
s.
true
if collColl
changed as a result of the call.private static <T extends Collection> boolean removeNonMinimalOrNonMaximalHelper(Collection<T> collColl, boolean removeNonMinimal)
collColl
's non-minimal/non-maximal members, simply using
containsAll(Collection<?>)
to compare the collections.
collColl
- a Collection
of Collection
s.removeNonMinimal
- whether it is the non-minimal or non-maximal members of collColl
that are to be removed.
true
if collColl
changed as a result of the call.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |