/** * Private constructor is used as a Java-language hack to allow us to save * a reference to the specified {@link UniqueList}. */ private PopularityList(UniqueList<E> uniqueList) { super(new SortedList<E>(uniqueList, new PopularityComparator<E>(uniqueList))); this.uniqueList = uniqueList; // listen for changes to the source list source.addListEventListener(this); }
/** * Private constructor is used as a Java-language hack to allow us to save * a reference to the specified {@link UniqueList}. */ private PopularityList(UniqueList<E> uniqueList) { super(new SortedList<E>(uniqueList, new PopularityComparator<E>(uniqueList))); this.uniqueList = uniqueList; // listen for changes to the source list source.addListEventListener(this); }
/** * Private constructor is used as a Java-language hack to allow us to save * a reference to the specified {@link UniqueList}. */ private PopularityList(UniqueList<E> uniqueList) { super(new SortedList<E>(uniqueList, new PopularityComparator<E>(uniqueList))); this.uniqueList = uniqueList; // listen for changes to the source list source.addListEventListener(this); }