@NotNull
    CompositeNode rightRotation() {
      // See: http://en.wikipedia.org/wiki/Tree_rotation
      CharSequence P = this.head;
      if (!(P instanceof CompositeNode)) {
        return this; // Head not a composite, cannot rotate.
      }
      CharSequence A = ((CompositeNode)P).head;
      CharSequence B = ((CompositeNode)P).tail;
      //noinspection UnnecessaryLocalVariable
      CharSequence C = this.tail;
      return new CompositeNode(A, new CompositeNode(B, C));
    }
@NotNull
    CompositeNode rightRotation()