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 Details

    • YXmlText

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

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

    • getNextSibling

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

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

      public YXmlText copy()
      Overrides:
      copy in class YText
    • 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 String toString()
      Overrides:
      toString in class YText
    • toJSON

      public 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