public bool AddData(T toAdd)
 {
     if (!TempElements.ContainsKey(toAdd))
     {
         TempElements[toAdd] = new FrequencyStorage <T>(toAdd);
         ContainedElements.Add(TempElements[toAdd]);
     }
     TempElements[toAdd].Increment();
     return(true);
 }
 public int Compare(FrequencyStorage <C> x, FrequencyStorage <C> y)
 {
     if (y.Frequency != x.Frequency)
     {
         return(y.Frequency.CompareTo(x.Frequency));
     }
     else
     {
         if (y.ContainedObject is IComparable yComp)
         {
             return(yComp.CompareTo(x.ContainedObject));
         }
         return(0);
     }
     throw new NotImplementedException();
 }