// as long as you don't access the by-numeral-index functions, // you can add and remove elements quickly. // upon accessing the list, it is updated once to fit the new data sclass ProbabilisticList extends AbstractRandomAccessList { MultiSetMap byProbability = multiSetMap_outerDescTreeMap_innerLinkedHashSet(); // main data structure L<> renderedAsList; // this is only updated when requested }