Class BagConstraint

    • Field Detail

      • bag

        protected java.util.Collection<?> bag
      • VALID_OPS

        public static final java.util.List<ConstraintOp> VALID_OPS
        List of possible operations
    • Constructor Detail

      • BagConstraint

        public BagConstraint​(QueryNode qn,
                             ConstraintOp op,
                             java.util.Collection<?> bag)
        Construct a BagConstraint from a Collection. Note that the bag isn't copied so it should not be changed after the Query has been executed. BagConstraint will accept ONE_OF and NONE_OF as constraint op arguments but will use corresponding IN and NOT_IN.
        Parameters:
        qn - the QueryNode to compare to the bag
        op - the operation
        bag - a Collection that represents the bag
      • BagConstraint

        public BagConstraint​(QueryNode qn,
                             ConstraintOp op,
                             ObjectStoreBag osb)
        Construct a BagConstraint from an ObjectStoreBag.
        Parameters:
        qn - the QueryNode to compare to the bag
        op - the operation
        osb - an ObjectStoreBag
    • Method Detail

      • getQueryNode

        public QueryNode getQueryNode()
        Get the QueryNode.
        Returns:
        QueryNode
      • getBag

        public java.util.Collection<?> getBag()
        Get the bag Collection.
        Specified by:
        getBag in interface ConstraintWithBag
        Returns:
        a Set of objects in the bag
      • getOsb

        public ObjectStoreBag getOsb()
        Get the ObjectStoreBag.
        Returns:
        an ObjectStoreBag
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object