1 21 package com.db4o.nativequery.expr.cmp; 22 23 public class ArrayAccessValue extends ComparisonOperandDescendant { 24 private ComparisonOperand _index; 25 26 public ArrayAccessValue(ComparisonOperandAnchor parent,ComparisonOperand index) { 27 super(parent); 28 _index = index; 29 } 30 31 public void accept(ComparisonOperandVisitor visitor) { 32 visitor.visit(this); 33 } 34 35 public ComparisonOperand index() { 36 return _index; 37 } 38 39 public boolean equals(Object obj) { 40 if(!super.equals(obj)) { 41 return false; 42 } 43 ArrayAccessValue casted=(ArrayAccessValue)obj; 44 return _index.equals(casted._index); 45 } 46 47 public int hashCode() { 48 return super.hashCode()*29+_index.hashCode(); 49 } 50 51 public String toString() { 52 return super.toString()+"["+_index+"]"; 53 } 54 } 55 | Popular Tags |