1 17 package org.apache.ldap.server.db; 18 19 20 import org.apache.ldap.server.schema.SerializableComparator; 21 22 import java.io.Serializable ; 23 24 25 31 public class KeyOnlyComparator 32 implements TupleComparator, Serializable 33 { 34 private static final long serialVersionUID = 3544956549803161397L; 35 36 37 private SerializableComparator keyComparator = null; 38 39 40 45 public KeyOnlyComparator( SerializableComparator comparator ) 46 { 47 keyComparator = comparator; 48 } 49 50 51 57 public SerializableComparator getKeyComparator() 58 { 59 return keyComparator; 60 } 61 62 63 69 public SerializableComparator getValueComparator() 70 { 71 throw new UnsupportedOperationException (); 72 } 73 74 75 85 public int compareKey( Object key1, Object key2 ) 86 { 87 return keyComparator.compare( key1, key2 ); 88 } 89 90 91 101 public int compareValue( Object value1, Object value2 ) 102 { 103 throw new UnsupportedOperationException (); 104 } 105 } 106 | Popular Tags |