/**
   * Method that returns all dispositions that matched exactly (in one side) with the argument
   * disposition.
   *
   * @param disposition The disposition to check
   */
  private List<Disposition> findAdjacentsDispositions(Disposition disposition) {
    if (mDispositions.size() <= 1) return null;

    // Check left size
    if (disposition.x != 0) {
      List<Disposition> dispositions = new ArrayList<Disposition>();
      for (Disposition d : mDispositions) {
        if (d.compareTo(disposition) != 0) {
          if ((d.x + d.w) == disposition.x
              && (d.y >= disposition.y)
              && ((d.y + d.h) <= (disposition.y + disposition.h))) {
            dispositions.add(d);
          }
        }
      }
      // Check if the sum of all the dispositions matches the disposition
      int sum = 0;
      for (Disposition d : dispositions) {
        sum += d.h;
      }
      if (sum == disposition.h) {
        return dispositions;
      }
    }
    // Check top size
    if (disposition.y != 0) {
      List<Disposition> dispositions = new ArrayList<Disposition>();
      for (Disposition d : mDispositions) {
        if (d.compareTo(disposition) != 0) {
          if ((d.y + d.h) == disposition.y
              && (d.x >= disposition.x)
              && ((d.x + d.w) <= (disposition.x + disposition.w))) {
            dispositions.add(d);
          }
        }
      }
      // Check if the sum of all the dispositions matches the disposition
      int sum = 0;
      for (Disposition d : dispositions) {
        sum += d.w;
      }
      if (sum == disposition.w) {
        return dispositions;
      }
    }
    // Check right size
    if ((disposition.x + disposition.w) != mCols) {
      List<Disposition> dispositions = new ArrayList<Disposition>();
      for (Disposition d : mDispositions) {
        if (d.compareTo(disposition) != 0) {
          if ((d.x) == (disposition.x + disposition.w)
              && (d.y >= disposition.y)
              && ((d.y + d.h) <= (disposition.y + disposition.h))) {
            dispositions.add(d);
          }
        }
      }
      // Check if the sum of all the dispositions matches the disposition
      int sum = 0;
      for (Disposition d : dispositions) {
        sum += d.h;
      }
      if (sum == disposition.h) {
        return dispositions;
      }
    }
    // Check bottom size
    if ((disposition.y + disposition.h) != mRows) {
      List<Disposition> dispositions = new ArrayList<Disposition>();
      for (Disposition d : mDispositions) {
        if (d.compareTo(disposition) != 0) {
          if ((d.y) == (disposition.y + disposition.h)
              && (d.x >= disposition.x)
              && ((d.x + d.w) <= (disposition.x + disposition.w))) {
            dispositions.add(d);
          }
        }
      }
      // Check if the sum of all the dispositions matches the disposition
      int sum = 0;
      for (Disposition d : dispositions) {
        sum += d.w;
      }
      if (sum == disposition.w) {
        return dispositions;
      }
    }
    return null;
  }