18 #ifndef _DECAF_UTIL_COLLECTION_H_ 19 #define _DECAF_UTIL_COLLECTION_H_ 67 template<
typename E >
122 virtual bool add(
const E& value) = 0;
154 virtual void clear() = 0;
169 virtual bool contains(
const E& value)
const = 0;
195 virtual bool isEmpty()
const = 0;
214 virtual bool remove(
const E& value) = 0;
256 virtual int size()
const = 0;
269 virtual std::vector<E>
toArray()
const = 0;
virtual void clear()=0
Removes all of the elements from this collection (optional operation).
The root interface in the collection hierarchy.
Definition: Collection.h:68
virtual std::vector< E > toArray() const =0
Returns an array containing all of the elements in this collection.
virtual bool containsAll(const Collection< E > &collection) const =0
Returns true if this collection contains all of the elements in the specified collection.
Implementing this interface allows an object to be cast to an Iterable type for generic collections A...
Definition: Iterable.h:32
virtual bool add(const E &value)=0
Returns true if this collection changed as a result of the call.
virtual ~Collection()
Definition: Collection.h:72
virtual bool removeAll(const Collection< E > &collection)=0
Removes all this collection's elements that are also contained in the specified collection (optional ...
virtual bool retainAll(const Collection< E > &collection)=0
Retains only the elements in this collection that are contained in the specified collection (optional...
virtual bool contains(const E &value) const =0
Returns true if this collection contains the specified element.
virtual bool equals(const Collection< E > &value) const =0
Compares the passed collection to this one, if they contain the same elements, i.e.
virtual int size() const =0
Returns the number of elements in this collection.
virtual void copy(const Collection< E > &collection)=0
Renders this Collection as a Copy of the given Collection.
The interface for all synchronizable objects (that is, objects that can be locked and unlocked)...
Definition: Synchronizable.h:37
virtual bool addAll(const Collection< E > &collection)=0
Adds all of the elements in the specified collection to this collection.
virtual bool isEmpty() const =0
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: AprPool.h:25