|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.data.provider.RowKey
com.sun.data.provider.impl.IndexRowKey
IndexRowKey uses an int index as the identifier for a data row in a
TableDataProvider
.
Field Summary |
Fields inherited from class com.sun.data.provider.RowKey |
EMPTY_ARRAY |
Constructor Summary | |
IndexRowKey(int index)
Constructs an IndexRowKey using the specified index |
Method Summary | |
int |
compareTo(java.lang.Object o)
Compare this instance to another IndexRowKey instance. |
static IndexRowKey |
create(java.lang.String rowId)
Constructs a new IndexRowKey from the passed rowId String |
boolean |
equals(java.lang.Object o)
Standard equals implementation. |
int |
getIndex()
Returns the index of this IndexRowKey |
java.lang.String |
toString()
Return a printable version of this instance. |
Methods inherited from class com.sun.data.provider.RowKey |
getRowId, setRowId |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public IndexRowKey(int index)
index
- The desired indexMethod Detail |
public static IndexRowKey create(java.lang.String rowId) throws java.lang.NumberFormatException
rowId
- The cannonical row ID string to parse into an int
java.lang.NumberFormatException
- If the passed String is not
parsable into an intpublic int getIndex()
public int compareTo(java.lang.Object o)
Compare this instance to another IndexRowKey
instance.
Standard implementation of compareTo(Object). This checks for equality first (using equals(Object)), then compares the rowId strings. This should be overridden by RowKey implementations that have a notion of order. This allows for deletions and insertions to be done in reverse order to help ensure the longevity of valid RowKeys.
compareTo
in interface java.lang.Comparable
compareTo
in class RowKey
public boolean equals(java.lang.Object o)
equals
in class RowKey
o
- the Object to check equality
Object.equals(Object)
public java.lang.String toString()
Return a printable version of this instance.
toString
in class RowKey
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |