Interface IMicroDataAware

All Known Subinterfaces:
IMicroCDATA, IMicroComment, IMicroText
All Known Implementing Classes:
MicroCDATA, MicroComment, MicroText

public interface IMicroDataAware
This is a helper interface that allows for setting character data. This is required by text and comment nodes.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendData(char cChar)
    Append a character to the string.
    void
    appendData(char[] aChars, int nOfs, int nLen)
    Append characters to the string.
    void
    Append characters to the string.
     
    void
    prependData(char cChar)
    Add a character to the beginning of the current data.
    void
    prependData(char[] aChars, int nOfs, int nLen)
    Add characters to the beginning of the current data.
    void
    Add characters to the beginning of the current data.
    void
    Change the character sequence.
  • Method Details

    • getData

      Returns:
      The currently assigned character data. May not be null .
    • setData

      void setData(@Nullable CharSequence sData)
      Change the character sequence. Any previously set characters are lost.
      Parameters:
      sData - The new character sequence to be set.
    • appendData

      void appendData(@Nullable CharSequence sData)
      Append characters to the string.
      Parameters:
      sData - The characters to be appended.
    • appendData

      void appendData(@Nonnull char[] aChars, @Nonnegative int nOfs, @Nonnegative int nLen)
      Append characters to the string.
      Parameters:
      aChars - Base character array. May not be null.
      nOfs - Offset to start copying. Must be ≥ 0.
      nLen - Number of chars to take. Must be ≥ 0.
    • appendData

      void appendData(char cChar)
      Append a character to the string.
      Parameters:
      cChar - The character to append
    • prependData

      void prependData(@Nullable CharSequence sData)
      Add characters to the beginning of the current data.
      Parameters:
      sData - The characters to be added at the front.
    • prependData

      void prependData(@Nonnull char[] aChars, @Nonnegative int nOfs, @Nonnegative int nLen)
      Add characters to the beginning of the current data.
      Parameters:
      aChars - Base character array. May not be null.
      nOfs - Offset to start copying. Must be ≥ 0.
      nLen - Number of chars to take. Must be ≥ 0.
    • prependData

      void prependData(char cChar)
      Add a character to the beginning of the current data.
      Parameters:
      cChar - The character to preprend