Added clear and contains methods to stack collection. Marked all methods final in stack collection.