diff options
author | James Ahlborn <jtahlborn@yahoo.com> | 2007-11-29 15:11:08 +0000 |
---|---|---|
committer | James Ahlborn <jtahlborn@yahoo.com> | 2007-11-29 15:11:08 +0000 |
commit | ff8135d7a347bace914dbb4b8a7d4393d00b2bbf (patch) | |
tree | 096c839195eece68ccfb1b866caed8483093d727 /src/java/com/healthmarketscience/jackcess/Index.java | |
parent | 286378cc0c135252bac0fc31f861fe21f8bfe77b (diff) | |
download | jackcess-ff8135d7a347bace914dbb4b8a7d4393d00b2bbf.tar.gz jackcess-ff8135d7a347bace914dbb4b8a7d4393d00b2bbf.zip |
rename skip methods; minor code cleanups
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@190 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/java/com/healthmarketscience/jackcess/Index.java')
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/Index.java | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Index.java b/src/java/com/healthmarketscience/jackcess/Index.java index 11d6330..fcfade3 100644 --- a/src/java/com/healthmarketscience/jackcess/Index.java +++ b/src/java/com/healthmarketscience/jackcess/Index.java @@ -985,6 +985,11 @@ public class Index implements Comparable<Index> { } @Override + public int hashCode() { + return _rowId.hashCode(); + } + + @Override public boolean equals(Object o) { return((this == o) || ((o != null) && (getClass() == o.getClass()) && @@ -1042,7 +1047,7 @@ public class Index implements Comparable<Index> { cmp = 1; invalid = other; } - return (cmp * (invalid.equals(FIRST_ENTRY.getRowId()) ? 1 : -1)); + return (cmp * (invalid.equals(FIRST_ENTRY) ? 1 : -1)); } @@ -1097,13 +1102,6 @@ public class Index implements Comparable<Index> { } } - @Override - public boolean equals(Object o) { - return((this == o) || - ((o != null) && (o != null) && (getClass() == o.getClass()) && - (compareTo((EntryColumn)o) == 0))); - } - /** * Write this non-null entry column to a buffer */ @@ -1455,7 +1453,6 @@ public class Index implements Comparable<Index> { } protected void reset(boolean moveForward) { - DirHandler handler = getDirHandler(moveForward); _curPos = getDirHandler(moveForward).getBeginningPosition(); _prevPos = _curPos; _lastModCount = Index.this._modCount; @@ -1551,9 +1548,9 @@ public class Index implements Comparable<Index> { curIdx = missingIndexToInsertionPoint(idx); between = true; } - } else if(rowId.equals(RowId.FIRST_ROW_ID)) { + } else if(entry.equals(FIRST_ENTRY)) { curIdx = FIRST_ENTRY_IDX; - } else if(rowId.equals(RowId.LAST_ROW_ID)) { + } else if(entry.equals(LAST_ENTRY)) { curIdx = LAST_ENTRY_IDX; } else { throw new IllegalArgumentException("Invalid entry given: " + entry); @@ -1694,6 +1691,11 @@ public class Index implements Comparable<Index> { } @Override + public int hashCode() { + return _entry.hashCode(); + } + + @Override public boolean equals(Object o) { return((this == o) || ((o != null) && (getClass() == o.getClass()) && |