Class YXmlText


  • public class YXmlText
    extends YText
    Represents text in a Dom Element. In the future this type will also handle simple formatting information like bold and italic.
    • Constructor Detail

      • YXmlText

        public YXmlText()
        Constructs a new YText without an optional initial string.
      • YXmlText

        public YXmlText​(java.lang.String string)
        Constructs a new YText with an optional initial string.
        Parameters:
        string - The initial value of the YText.
    • Method Detail

      • getNextSibling

        public YXmlElement getNextSibling()
        Returns:
        YXmlElement or YXmlText|null
      • getPrevSibling

        public YXmlElement getPrevSibling()
        Returns:
        YXmlElement or YXmlText|null
      • clone

        public YXmlText clone()
        Makes a copy of this data type that can be included somewhere else. Note that the content is only readable _after_ it has been included somewhere in the Ydoc.
        Overrides:
        clone in class YText
        Returns:
        YXmlText
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class YText
      • toJSON

        public java.lang.String toJSON()
        Description copied from class: AbstractType
        Converts the type to a JSON object representation.
        Overrides:
        toJSON in class YText
        Returns:
        The JSON object representation
      • write

        public void write​(UpdateEncoder encoder)
        Description copied from class: AbstractType
        Writes this type's state to the encoder.
        Overrides:
        write in class YText
        Parameters:
        encoder - The encoder to write data to.
      • readYXmlText

        public static YXmlText readYXmlText​(UpdateDecoder decoder)
        Overloaded method for reading with UpdateDecoderV1
        Parameters:
        decoder - The decoder to read data from.
        Returns:
        YXmlText