Class PointLocationSubCubePredicate

  • All Implemented Interfaces:
    Predicate<ILocation>

    public class PointLocationSubCubePredicate
    extends Object
    implements Predicate<ILocation>
    Predicate that tests whether the member of the the given hierarchy with coordinates extracted by a given ILocation is granted (true) or not (false).

    It is the user's responsibility to make sure every evaluated locations belongs to the same scope and that these locations are not range locations.

    • Constructor Detail

      • PointLocationSubCubePredicate

        public PointLocationSubCubePredicate​(IContext context,
                                             ILocation scope,
                                             IHierarchyInfo hierarchyInfo)
        Constructor.
        Parameters:
        context - the current context to retrieve the subcube from
        scope - the scope of the query
        hierarchyInfo - the hierarchy to look at
    • Method Detail

      • test

        public boolean test​(ILocation locationToTest)
        Verifies for each location.
        LocationUtil.belongsToScope(ILocation scope, ILocation locationToTest) is true.
        Specified by:
        test in interface Predicate<ILocation>