#include "oop.h"

Association::Association(oop key, oop value)
{
  mKey= key;
  mValue= value;
}

oop Association::key(void)
{
  return mKey;
}

oop Association::value(void)
{
  return mValue;
}

oop Association::key(oop key)
{
  return mKey= key;
}

oop Association::value(oop value)
{
  return mValue= value;
}

unsigned Association::hash(void)
{
  return mKey->hash();
}

int Association::operator ==(oop anObject)
{
  return *mKey == anObject;
}

oop Association::printOn(oop aStream)
{
  aStream
    ->format("(")
    ->print(mKey)
    ->format(" -> ")
    ->print(mValue)
    ->format(")");
  return this;
}

