1 19 package org.netbeans.mdr.persistence.btreeimpl.btreestorage; 20 21 22 class PageID { 23 24 int fileIndex; 25 26 27 int offset; 28 29 33 PageID(int fIdx, int ofst) { 34 fileIndex = fIdx; 35 offset = ofst; 36 } 37 38 39 public boolean equals(Object o) { 40 if (!(o instanceof PageID)) 41 return false; 42 43 PageID page = (PageID)o; 44 return page.fileIndex == this.fileIndex && 45 page.offset == this.offset; 46 } 47 48 49 public int hashCode() { 50 return fileIndex + offset; 51 } 52 53 54 public String toString() { 55 return Integer.toString(fileIndex) + ":" + offset; 56 } 57 } 58 | Popular Tags |