Package com.helger.xml.microdom
Interface IMicroDataAware
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
IMicroCDATA,IMicroComment,IMicroText
- All Known Implementing Classes:
MicroCDATA,MicroComment,MicroText
public interface IMicroDataAware extends Serializable
This is a helper interface that allows for setting character data. This is required by text and comment nodes.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappendData(char cChar)Append a character to the string.voidappendData(char[] aChars, int nOfs, int nLen)Append characters to the string.voidappendData(CharSequence sData)Append characters to the string.CharSequencegetData()voidprependData(char cChar)Add a character to the beginning of the current data.voidprependData(char[] aChars, int nOfs, int nLen)Add characters to the beginning of the current data.voidprependData(CharSequence sData)Add characters to the beginning of the current data.voidsetData(CharSequence sData)Change the character sequence.
-
-
-
Method Detail
-
getData
@Nonnull CharSequence 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 benull.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 benull.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
-
-