AbstractBag, for supporting different Bag implementations