1 30 31 package com.hp.hpl.jena.xmloutput.impl; 32 33 37 class PairEntry implements java.util.Map.Entry { 38 Object a; 39 Object b; 40 public boolean equals(Object o) { 41 if (o != null && (o instanceof PairEntry)) { 42 PairEntry e = (PairEntry) o; 43 return e.a.equals(a) && e.b.equals(b); 44 } else { 45 return false; 46 } 47 } 48 public Object getKey() { 49 return a; 50 } 51 public Object getValue() { 52 return b; 53 } 54 public int hashCode() { 55 return a.hashCode() ^ b.hashCode(); 56 } 57 public Object setValue(Object value) { 58 throw new UnsupportedOperationException (); 59 } 60 PairEntry(Object a, Object b) { 61 this.a = a; 62 this.b = b; 63 } 64 } 65 | Popular Tags |