Simple Rope Implementation in Java