Package com.iizix.text
Interface IKStringHTMLHyperlink
- All Known Implementing Classes:
KStringHTMLHyperlinkExternalTag
,KStringHTMLHyperlinkResourceTag
,KStringHTMLHyperlinkUITag
,KStringHTMLHyperlinkVSTag
public interface IKStringHTMLHyperlink
Interface for all HTML hyperlink tags.- Author:
- Christopher Mindus
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getAttribute(java.lang.String attributeName)
Gets the attribute value.java.lang.String
getHTMLString(java.lang.StringBuilder useme, IKStringInfoProvider provider)
Gets the string representation of this tag in the HTML format.int
getSourceEndPosition()
Gets the ending position of this tag in the source string.int
getSourcePosition()
Gets the source position of this tag in the source string.KStringTag.Type
getType()
Gets the type of this tag.boolean
setAttribute(java.lang.String attributeName, java.lang.String value)
Updates an attribute value or removes it.boolean
setReference(java.lang.String ref)
Sets the reference.void
setTarget(java.lang.String target)
Sets the target reference, if supported.
Method Detail
getType
KStringTag.Type getType()
Gets the type of this tag.- Returns:
- The type of this tag.
getSourcePosition
int getSourcePosition()
Gets the source position of this tag in the source string.- Returns:
- The start position of the tag.
getSourceEndPosition
int getSourceEndPosition()
Gets the ending position of this tag in the source string.- Returns:
- The end position of the tag.
getAttribute
java.lang.String getAttribute(java.lang.String attributeName)
Gets the attribute value.- Parameters:
attributeName
- The name of the attribute.- Returns:
- The value, or null if the attribute is not present.
setAttribute
boolean setAttribute(java.lang.String attributeName, java.lang.String value)
Updates an attribute value or removes it.- Parameters:
attributeName
- The attribute name.value
- The value to set, or null to remove the attribute.- Returns:
- true for changed, false for no change.
setReference
boolean setReference(java.lang.String ref)
Sets the reference.- Parameters:
ref
- The reference.- Returns:
- true For success (change), false for failure or no change.
setTarget
void setTarget(java.lang.String target)
Sets the target reference, if supported.- Parameters:
target
- The new target.
getHTMLString
java.lang.String getHTMLString(java.lang.StringBuilder useme, IKStringInfoProvider provider)
Gets the string representation of this tag in the HTML format. Method needs to be overridden for IZ that replaces the entire tag with an HTML string.- Parameters:
useme
- Temporary StringBuilder for any use.provider
- The information provider or null for none.- Returns:
- The HTML string.