1 21 package com.db4o; 22 23 import com.db4o.foundation.*; 24 25 28 class QOrder extends Tree{ 29 30 final QConObject _constraint; 31 final QCandidate _candidate; 32 33 QOrder(QConObject a_constraint, QCandidate a_candidate){ 34 _constraint = a_constraint; 35 _candidate = a_candidate; 36 } 37 38 public int compare(Tree a_to) { 39 if(_constraint.i_comparator.isSmaller(_candidate.value())){ 40 return _constraint.i_orderID; 41 } 42 if(_constraint.i_comparator.isEqual(_candidate.value())){ 43 return 0; 44 } 45 return - _constraint.i_orderID; 46 } 47 48 public Object shallowClone() { 49 QOrder order= new QOrder(_constraint,_candidate); 50 super.shallowCloneInternal(order); 51 return order; 52 } 53 54 public Object key(){ 55 throw new NotImplementedException(); 56 } 57 58 } 59 60 | Popular Tags |