org.jdom
public abstract class Content extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable
Parent
nodes.Comment
,
DocType
,
Element
,
EntityRef
,
Parent
,
ProcessingInstruction
,
Text
,
Serialized FormModifier | Constructor and Description |
---|---|
protected |
Content() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a deep, unattached copy of this child and its descendants
detached from any parent or document.
|
Content |
detach()
Detaches this child from its parent or does nothing if the child
has no parent.
|
boolean |
equals(java.lang.Object ob)
This tests for equality of this Content object to the supplied object.
|
Document |
getDocument()
Return this child's owning document or null if the branch containing
this child is currently not attached to a document.
|
Parent |
getParent()
Return this child's parent, or null if this child is currently
not attached.
|
Element |
getParentElement()
A convenience method that returns any parent element for this element,
or null if the element is unattached or is a root element.
|
abstract java.lang.String |
getValue()
Returns the XPath 1.0 string value of this child.
|
int |
hashCode()
This returns the hash code for this
Content item. |
protected Content |
setParent(Parent parent)
Sets the parent of this Content.
|
protected Parent parent
public Content detach()
public Parent getParent()
Element
or a Document
.public Element getParentElement()
protected Content setParent(Parent parent)
parent
- new parent elementpublic Document getDocument()
public abstract java.lang.String getValue()
public java.lang.Object clone()
clone
in class java.lang.Object
public final boolean equals(java.lang.Object ob)
equals
in class java.lang.Object
ob
- Object
to compare to.boolean
- whether the Content
is
equal to the supplied Object
.public final int hashCode()
Content
item.hashCode
in class java.lang.Object
int
- hash code.Copyright © 2007 Jason Hunter, Brett McLaughlin. All Rights Reserved.