// Path: src/main/java/net/seninp/util/SortedArrayList.java
// public class SortedArrayList<T> extends ArrayList<T> {
// 
//   /** The fancy serial. */
//   private static final long serialVersionUID = 291265617765342218L;
// 
//   /**
//    * Inserts an element and sorts the array.
//    * 
//    * @param value the value to insert.
//    */
//   public void insertSorted(T value) {
//     add(value);
//     @SuppressWarnings("unchecked")
//     Comparable<T> cmp = (Comparable<T>) value;
//     for (int i = size() - 1; i > 0 && cmp.compareTo(get(i - 1)) < 0; i--) {
//       Collections.swap(this, i, i - 1);
//     }
//   }
// }


import java.util.Iterator;
import java.util.List;
import net.seninp.util.SortedArrayList;

package net.seninp.jmotif.sax.discord;


/**
 * The discord records collection.
 * 
 * @author Pavel Senin
 * 
 */
public class DiscordRecords implements Iterable<DiscordRecord> {

  /** Storage container. */
  private final SortedArrayList<DiscordRecord> discords;

  /**
   * Constructor.
   */
  public DiscordRecords() {

// Path: src/main/java/net/seninp/util/SortedArrayList.java
// public class SortedArrayList<T> extends ArrayList<T> {
// 
//   /** The fancy serial. */
//   private static final long serialVersionUID = 291265617765342218L;
// 
//   /**
//    * Inserts an element and sorts the array.
//    * 
//    * @param value the value to insert.
//    */
//   public void insertSorted(T value) {
//     add(value);
//     @SuppressWarnings("unchecked")
//     Comparable<T> cmp = (Comparable<T>) value;
//     for (int i = size() - 1; i > 0 && cmp.compareTo(get(i - 1)) < 0; i--) {
//       Collections.swap(this, i, i - 1);
//     }
//   }
// }


// Path: src/main/java/net/seninp/jmotif/sax/discord/DiscordRecords.java
import java.util.Iterator;
import java.util.List;
import net.seninp.util.SortedArrayList;

package net.seninp.jmotif.sax.discord;


/**
 * The discord records collection.
 * 
 * @author Pavel Senin
 * 
 */
public class DiscordRecords implements Iterable<DiscordRecord> {

  /** Storage container. */
  private final SortedArrayList<DiscordRecord> discords;

  /**
   * Constructor.
   */
  public DiscordRecords() {

    this.discords = new SortedArrayList<DiscordRecord>();
