public synchronized void add(Object obj){
  obj=copy(obj);
  if (m_History.contains(obj)) {
    m_History.remove(obj);
  }
  m_History.insertElementAt(obj,0);
  while (m_History.size() > MAX_HISTORY_COUNT) {
    m_History.remove(m_History.size() - 1);
  }
}

public synchronized void add ( Object obj ) { obj = copy ( obj ) ; if ( m_History . contains ( obj ) ) { m_History . remove ( obj ) ; } m_History . insertElementAt ( obj , 0 ) ; while ( m_History . size ( ) > MAX_HISTORY_COUNT ) { m_History . remove ( m_History . size ( ) - 1 ) ; } }
adds the object to the history .
