Package com.helger.xml.microdom
Class MicroProcessingInstruction
- java.lang.Object
-
- com.helger.xml.microdom.AbstractMicroNode
-
- com.helger.xml.microdom.MicroProcessingInstruction
-
- All Implemented Interfaces:
com.helger.commons.hierarchy.IHasChildren<IMicroNode>,com.helger.commons.hierarchy.IHasChildrenRecursive<IMicroNode>,com.helger.commons.hierarchy.IHasChildrenSorted<IMicroNode>,com.helger.commons.hierarchy.IHasParent<IMicroNode>,com.helger.commons.lang.ICloneable<IMicroNode>,IMicroNode,IMicroProcessingInstruction,Serializable
@Immutable public final class MicroProcessingInstruction extends AbstractMicroNode implements IMicroProcessingInstruction
Default implementation of theIMicroProcessingInstructioninterface.- Author:
- Philip Helger
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MicroProcessingInstruction(String sTarget)MicroProcessingInstruction(String sTarget, String sData)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IMicroProcessingInstructiongetClone()StringgetData()StringgetNodeName()StringgetNodeValue()StringgetTarget()EMicroNodeTypegetType()booleanisEqualContent(IMicroNode o)As instances of this class may not implement equals/hashCode we need a way to determine, if 2 nodes are equal by content.StringtoString()-
Methods inherited from class com.helger.xml.microdom.AbstractMicroNode
appendChild, detachFromParent, findFirstChild, findFirstChildMapped, findParentElement, forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getAllChildren, getAllEventTargets, getAllEventTargets, getChildAtIndex, getChildCount, getChildren, getFirstChild, getLastChild, getNextSibling, getParent, getPreviousSibling, hasChildren, hasParent, insertAfter, insertAtIndex, insertBefore, internalResetParentNode, internalSetParentNode, internalTriggerEvent, isCDATA, isComment, isContainer, isDocument, isDocumentType, isElement, isEntityReference, isProcessingInstruction, isText, onAppendChild, onEvent, onInsertAfter, onInsertAtIndex, onInsertBefore, onRemoveAllChildren, onRemoveChild, onRemoveChildAtIndex, registerEventTarget, removeAllChildren, removeChild, removeChildAtIndex, unregisterEventTarget
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildren
forAllChildren, forAllChildren, forAllChildrenBreakable, forAllChildrenMapped, getChildCount, getChildren, hasChildren, hasNoChildren
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenRecursive
forAllChildrenRecursive, forAllChildrenRecursive
-
Methods inherited from interface com.helger.commons.hierarchy.IHasChildrenSorted
findFirstChild, findFirstChildMapped, getChildAtIndex
-
Methods inherited from interface com.helger.xml.microdom.IMicroNode
appendCDATA, appendCDATA, appendCDATA, appendCDATAWithConversion, appendChild, appendChildren, appendChildren, appendComment, appendComment, appendComment, appendCommentWithConversion, appendContainer, appendElement, appendElement, appendEntityReference, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendIgnorableWhitespaceText, appendProcessingInstruction, appendText, appendText, appendText, appendTextWithConversion, containsAnyChild, detachFromParent, findParentElement, getAllChildren, getAllChildrenRecursive, getAllEventTargets, getAllEventTargets, getFirstChild, getLastChild, getNextSibling, getParent, getParentElementWithName, getParentElementWithName, getPreviousSibling, hasParent, insertAfter, insertAtIndex, insertBefore, isCDATA, isComment, isContainer, isDocument, isDocumentType, isElement, isEntityReference, isProcessingInstruction, isText, registerEventTarget, removeAllChildren, removeChild, removeChildAtIndex, replaceChild, unregisterEventTarget
-
-
-
-
Method Detail
-
getType
@Nonnull public EMicroNodeType getType()
- Specified by:
getTypein interfaceIMicroNode- Returns:
- The node type. Never
null.
-
getNodeName
@Nonnull @Nonempty public String getNodeName()
- Specified by:
getNodeNamein interfaceIMicroNode- Returns:
- Just an abstract name that depends on the implementing class. For
IMicroElementnodes this is the same as the tag name.
-
getNodeValue
@Nonnull @Nonempty public String getNodeValue()
- Specified by:
getNodeValuein interfaceIMicroNode- Returns:
- The value of this node. This depends on the concrete implementation
class. It is currently implemented for
IMicroText,IMicroCommentandIMicroEntityReference.
-
getTarget
public String getTarget()
- Specified by:
getTargetin interfaceIMicroProcessingInstruction- Returns:
- The target (e.g. xml-stylesheet)
-
getData
public String getData()
- Specified by:
getDatain interfaceIMicroProcessingInstruction- Returns:
- The data (e.g. href="headlines.css" type="text/css")
-
getClone
@Nonnull public IMicroProcessingInstruction getClone()
Description copied from interface:IMicroProcessingInstruction- Specified by:
getClonein interfacecom.helger.commons.lang.ICloneable<IMicroNode>- Specified by:
getClonein interfaceIMicroProcessingInstruction
-
isEqualContent
public boolean isEqualContent(@Nullable IMicroNode o)
Description copied from interface:IMicroNodeAs instances of this class may not implement equals/hashCode we need a way to determine, if 2 nodes are equal by content.- Specified by:
isEqualContentin interfaceIMicroNode- Parameters:
o- The node to compare to this.- Returns:
trueif the nodes are of the same type and the same content,falseotherwise.
-
toString
public String toString()
- Overrides:
toStringin classAbstractMicroNode
-
-