/* * Artists - represents a collection of 'Artist' */ class Artists{ static final boolean LOG = true; static final boolean LINEAR = false; int maxPlays; // The maximum plays from any artist Vector artistList; // A list of artist, sortable by many means HashMap artistMap; // A lookup map of artist names to their respective objects ListeningHistory parent; // The history object that contains this boolean logPopularity; // should this be logarithmic or linear Artists(ListeningHistory parent){ this.parent = parent; this.maxPlays = 0; artistList = new Vector(); artistMap = new HashMap(); logPopularity = true; } void setPopularityScale(boolean l){ if(logPopularity != l){ logPopularity = l; for(int i=0; i