void (int size) { maxHistory = size; int current = history.size(); if (current > size) { history.subList(size, current).clear(); shownHistory = history; fireContentsChanged(this, maxHistory, current); } }