public class ScopeUtils extends Object
Constructor and Description |
---|
ScopeUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
isApplicableInContext(ScopedIF obj,
Collection<TopicIF> context)
Checks to see if the ScopedIF's scope is applicable in the user
context.
|
static boolean |
isIntersectionOfContext(ScopedIF obj,
Collection<TopicIF> context)
Checks to see if the ScopedIF's scope intersects with the user
context.
|
static boolean |
isIntersectionOfContext(ScopedIF obj,
TopicIF[] context)
EXPERIMENTAL:
|
static boolean |
isSubsetOfContext(ScopedIF obj,
Collection<TopicIF> context)
Checks to see if the ScopedIF's scope is a subset of the user
context.
|
static boolean |
isSupersetOfContext(ScopedIF obj,
Collection<TopicIF> context)
Checks to see if the ScopedIF's scope is a superset of the user
context.
|
static boolean |
isSupersetOfContext(ScopedIF obj,
TopicIF[] context)
EXPERIMENTAL:
|
static <S extends ScopedIF> |
rankByScope(Collection<S> scoped,
Collection<TopicIF> scope)
Ranks the ScopedIFs by the applicability to the specified scope.
|
static <S extends ScopedIF> |
rankByScope(Collection<S> scoped,
TopicIF theme)
Ranks the ScopedIFs by the applicability to the specified scope.
|
public static boolean isApplicableInContext(ScopedIF obj, Collection<TopicIF> context)
obj
- The ScopedIF object to compare with.context
- The user context; a collection of TopicIFs.public static boolean isSupersetOfContext(ScopedIF obj, Collection<TopicIF> context)
Note that the unconstrained scope is in this case considered an empty set.
obj
- The ScopedIF object to compare with.context
- The user context; a collection of TopicIFs.public static boolean isSupersetOfContext(ScopedIF obj, TopicIF[] context)
public static boolean isSubsetOfContext(ScopedIF obj, Collection<TopicIF> context)
Note that the unconstrained scope is in this case considered an empty set.
obj
- The ScopedIF object to compare with.context
- The user context; a collection of TopicIFs.public static boolean isIntersectionOfContext(ScopedIF obj, Collection<TopicIF> context)
Note that the unconstrained scope is in this case considered an empty set.
obj
- The ScopedIF object to compare with.context
- The user context; a collection of TopicIFs.public static boolean isIntersectionOfContext(ScopedIF obj, TopicIF[] context)
public static <S extends ScopedIF> List<S> rankByScope(Collection<S> scoped, TopicIF theme)
public static <S extends ScopedIF> List<S> rankByScope(Collection<S> scoped, Collection<TopicIF> scope)