1 6 7 package com.jofti.btree; 8 9 10 11 12 13 21 public class MaxLeafNodeEntry extends LeafNodeEntry { 22 23 24 25 26 29 private static final long serialVersionUID = 6070643245506500846L; 30 31 public MaxLeafNodeEntry(){ 32 value = new ValueObject(Integer.MAX_VALUE,ValueObject.MAX_COMAPARBLE_VALUE); 33 } 34 35 36 public Comparable getValue() { 37 return value; 38 } 39 40 44 45 public void setValue(Comparable value) { 46 } 48 49 public String toString(){ 50 StringBuffer buf = new StringBuffer (); 51 buf.append("value:"+value); 52 buf.append(","); 53 54 55 return buf.toString(); 56 } 57 58 96 public int compareTo(Object o) { 97 if (o instanceof MaxLeafNodeEntry) { 98 return 0; 99 } 100 return 1; 101 } 102 103 public boolean equals(Object o) { 104 if (o instanceof MaxLeafNodeEntry) { 105 return true; 106 } 107 return false; 108 } 109 110 111 } 112 | Popular Tags |