class StringContainer {

  public StringContainer getSubStringContainer(int start, int end) {
    int realStartIndex = start >= 0 ? start : count + start;
    int realEndIndex = end >= 0 ? end : count + end;
    if (realStartIndex < 0 || realStartIndex >= count) {
      throw new IndexOutOfBoundsException(String.format(
          "start Index: %d, Real start Index: %d, Size: %d", start, realStartIndex, count));
    }
    if (realEndIndex < 0 || realEndIndex >= count) {
      throw new IndexOutOfBoundsException(String.format(
          "end Index: %d, Real end Index: %d, Size: %d", end, realEndIndex, count));
    }
    StringContainer ret = new StringContainer(joinSeparator);
    if (realStartIndex < reverseList.size()) {
      for (int i = reverseList.size() - 1 - realStartIndex; i >= Math.max(0,
          reverseList.size() - 1 - realEndIndex); i--) {
        ret.addTail(this.reverseList.get(i));
      }
    }
    if (realEndIndex >= reverseList.size()) {
      for (int i = Math.max(0, realStartIndex - reverseList.size()); i <= realEndIndex - reverseList.size(); i++) {
        ret.addTail(this.sequenceList.get(i));
      }
    }
    return ret;
  }

  public  StringContainer();
  public  StringContainer(String joinSeparator);
  public  StringContainer(String[] strings);
  public  StringContainer(String[] strings, String joinSeparator);

}