#ifndef COLLECTION_H_
#define COLLECTION_H_
#ifndef NULL
#define NULL 0
#endif

#include <iostream>
using std::cout;

class NodeData {
  public:
  
  int key;
  
  NodeData(int pKey = 0) : key(pKey) {}
  
  /**
   * Prints the data and key for this Node to cout
   */
  virtual void print() {
    cout << key;
  }
};

class Collection {
  public:
    virtual ~Collection() {}
    /**
     * Returns the count of the number of elements in the Collection
     */
    virtual int size() const = 0;
    
    /**
     * Adds the given data value to the Collection.
     */
    virtual void add(NodeData*) = 0;
    
    /**
     * Removes the value corresponding to the index from the Collection.
     */
    virtual NodeData* remove(int) = 0;
    
    /**
     * Returns true if the given integer key is a member of the Collection.
     */
    virtual bool member(int) const = 0;
    
    /**
     * Returns the NodeData of the first element of the Collection.
     */
    virtual NodeData* first() const = 0;
};

#endif /*COLLECTION_H_*/
