T get()

in model/src/main/java/jetbrains/jetpad/model/collections/list/TreeList.java [112:128]


    T get(int index) {
      int leftSize = size(myLeft);

      if (index < leftSize) {
        if (myLeft == null) {
          throw new IndexOutOfBoundsException();
        }
        return myLeft.get(index);
      } else if (index == leftSize) {
        return myValue;
      } else {
        if (myRight == null) {
          throw new IndexOutOfBoundsException();
        }
        return myRight.get(index - leftSize - 1);
      }
    }