| 
JavaTM 2 Platform Standard Ed. 5.0  | 
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectjava.text.ParsePosition
public class ParsePosition
ParsePosition 是 Format 及其子类所使用的简单类,用来在分析过程中跟踪当前位置。各种 Format 类中的 parseObject 方法要求将 ParsePosition 对象作为一个变量。
 
分析具有不同格式的字符串时,可以使用同一个 ParsePosition,因为索引参数记录的是当前位置。
Format| 构造方法摘要 | |
|---|---|
ParsePosition(int index)
创建一个具有给定初始索引的新 ParsePosition。  | 
|
| 方法摘要 | |
|---|---|
 boolean | 
equals(Object obj)
重写 equals  | 
 int | 
getErrorIndex()
检索出错时的索引,如果没有设置错误索引,则为 -1。  | 
 int | 
getIndex()
检索当前的分析位置。  | 
 int | 
hashCode()
返回此 ParsePosition 的哈希码。  | 
 void | 
setErrorIndex(int ei)
设置分析出错时的索引。  | 
 void | 
setIndex(int index)
设置当前分析位置。  | 
 String | 
toString()
返回此 ParsePosition 的字符串表示形式。  | 
| 从类 java.lang.Object 继承的方法 | 
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait | 
| 构造方法详细信息 | 
|---|
public ParsePosition(int index)
| 方法详细信息 | 
|---|
public int getIndex()
public void setIndex(int index)
public void setErrorIndex(int ei)
public int getErrorIndex()
public boolean equals(Object obj)
Object 中的 equalsobj - 要与之比较的引用对象。
true;否则返回 false。Object.hashCode(), 
Hashtablepublic int hashCode()
Object 中的 hashCodeObject.equals(java.lang.Object), 
Hashtablepublic String toString()
Object 中的 toString
  | 
JavaTM 2 Platform Standard Ed. 5.0  | 
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2004 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。