public Tuple2<ReadOnlyStyledDocument<PS, SEG, S>, ReadOnlyStyledDocument<PS, SEG, S>> split(int position) {
        return tree.locate(NAVIGATE, position).map(this::split);
    }
public Tuple2 < ReadOnlyStyledDocument < PS , SEG , S > , ReadOnlyStyledDocument < PS , SEG , S > > split ( int position ) { return tree . locate ( NAVIGATE , position ) . map ( this :: split ) ; }
Splits this document into two at the given position and returns both halves.