|
JavaTM 2 Platform Standard Ed. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
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. 6 |
|||||||||
| 上一個類別 下一個類別 | 框架 無框架 | |||||||||
| 摘要: 巢狀 | 欄位 | 建構子 | 方法 | 詳細資訊: 欄位 | 建構子 | 方法 | |||||||||
版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。