Class JniYText

java.lang.Object
net.carcdr.ycrdt.jni.JniYText
All Implemented Interfaces:
AutoCloseable, net.carcdr.ycrdt.YText

public class JniYText extends Object implements net.carcdr.ycrdt.YText
YText represents a collaborative text type in a Y-CRDT document.

YText provides efficient collaborative text editing with automatic conflict resolution. Multiple users can edit the same text simultaneously, and changes will be merged automatically using CRDT algorithms.

This class implements Closeable and should be used with try-with-resources to ensure proper cleanup of native resources.

Example usage:


 try (YDoc doc = new YDoc();
      YText text = doc.getText("mytext")) {
     text.insert(0, "Hello");
     text.push(" World");
     System.out.println(text.toString()); // "Hello World"
 }
 
See Also:
  • YDoc