public class Text extends Node
Copyright (C) 2002 Hewlett-Packard Company. This file is part of Sparta, an XML Parser, DOM, and XPath library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Text| 构造器和说明 |
|---|
Text(char ch)
Create with an initial character as its data.
|
Text(String data)
Create with an initial character as its data.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
appendData(char ch) |
void |
appendData(char[] cbuf,
int offset,
int len) |
void |
appendData(String s) |
Object |
clone()
Deep clone: returns Text node with copy of this ones data.
|
protected int |
computeHashCode()
Called whenever cached version of hashCode needs to be regenerated.
|
boolean |
equals(Object thatO)
Text nodes can be equal even if they are in different documents,
different parents, different siblings, or different annotations.
|
String |
getData() |
void |
setData(String data) |
Element |
xpathSelectElement(String xpath)
Not implemented.
|
Enumeration |
xpathSelectElements(String xpath)
Not implemented.
|
String |
xpathSelectString(String xpath)
Not implemented.
|
Enumeration |
xpathSelectStrings(String xpath)
Not implemented
|
getAnnotation, getNextSibling, getOwnerDocument, getParentNode, getPreviousSibling, hashCode, htmlEncode, setAnnotation, toString, toXml, xpathSetStringspublic Text(String data)
public Text(char ch)
public Object clone()
public void appendData(String s)
public void appendData(char ch)
public void appendData(char[] cbuf,
int offset,
int len)
cbuf - characters, some of which are to be appended to the text dataoffset - the first index in cbuf to copylen - the number of characters to copypublic String getData()
public void setData(String data)
public Enumeration xpathSelectElements(String xpath)
xpathSelectElements 在类中 Nodepublic Enumeration xpathSelectStrings(String xpath)
xpathSelectStrings 在类中 Nodepublic Element xpathSelectElement(String xpath)
xpathSelectElement 在类中 Nodepublic String xpathSelectString(String xpath)
xpathSelectString 在类中 Nodepublic boolean equals(Object thatO)
protected int computeHashCode()
computeHashCode 在类中 NodeCopyright © 2016. All Rights Reserved.