1 6 7 package com.hp.hpl.jena.graph.query.regexptrees; 8 9 10 17 public class Paren extends RegexpTree 18 { 19 protected RegexpTree operand; 20 protected int index; 21 22 public Paren( RegexpTree tree ) 23 { this( tree, 0 ); } 24 25 public Paren( RegexpTree tree, int index ) 26 { this.operand = tree; this.index = index; } 27 28 public RegexpTree getOperand() 29 { return operand; } 30 31 public int getIndex() 32 { return index; }; 33 34 public boolean equals( Object other ) 35 { return other instanceof Paren && operand.equals( ((Paren) other).operand ); } 36 37 public int hashCode() 38 { return operand.hashCode(); } 39 40 public String toString() 41 { return "(" + operand + ")"; } 42 } 43 44 | Popular Tags |