1 5 package com.jofti.btree; 6 7 import java.io.Externalizable ; 8 import java.io.IOException ; 9 import java.io.ObjectInput ; 10 import java.io.ObjectOutput ; 11 12 20 public class MaxComparableValue implements Comparable , Externalizable { 21 22 25 26 29 private static final long serialVersionUID = -6357574189849245519L; 30 31 public MaxComparableValue(){ 32 33 } 34 35 public int compareTo(Object o) 36 { 37 if (o instanceof MaxComparableValue){ 38 return 0; 39 }else{ 40 return 1; 41 } 42 } 43 44 public boolean equals(Object o){ 45 if (o instanceof MaxComparableValue){ 46 return true; 47 } 48 return false; 49 } 50 51 public int hashCode(){ 52 return 0; 54 } 55 56 59 public void readExternal(ObjectInput in) throws IOException , ClassNotFoundException { 60 61 62 } 63 64 67 public void writeExternal(ObjectOutput out) throws IOException { 68 69 70 } 71 } 72 | Popular Tags |