class SimpleFrequencyFactory extends AbstractNamedInstanceFactory<SimpleFrequency> {

  @Deprecated
  public Iterator<SimpleFrequency> enumerateAvailableFrequencies() {
    List<SimpleFrequency> frequencies = new ArrayList<>(instanceMap().values());
    Collections.sort(frequencies, new Comparator<SimpleFrequency>() {
      @Override
      public int compare(final SimpleFrequency o1, final SimpleFrequency o2) {
        return (int) Math.signum(o2.getPeriodsPerYear() - o1.getPeriodsPerYear());
      }
    });
    return frequencies.iterator();
  }

  private  SimpleFrequencyFactory();

}