1 16 17 package com.sun.org.apache.xpath.internal.objects; 18 19 import com.sun.org.apache.xml.internal.dtm.DTM; 20 import com.sun.org.apache.xpath.internal.XPathContext; 21 28 public final class DTMXRTreeFrag { 29 private DTM m_dtm; 30 private int m_dtmIdentity = DTM.NULL; 31 private XPathContext m_xctxt; 32 33 public DTMXRTreeFrag(int dtmIdentity, XPathContext xctxt){ 34 m_xctxt = xctxt; 35 m_dtmIdentity = dtmIdentity; 36 m_dtm = xctxt.getDTM(dtmIdentity); 37 } 38 39 public final void destruct(){ 40 m_dtm = null; 41 m_xctxt = null; 42 } 43 44 final DTM getDTM(){return m_dtm;} 45 public final int getDTMIdentity(){return m_dtmIdentity;} 46 final XPathContext getXPathContext(){return m_xctxt;} 47 48 public final int hashCode() { return m_dtmIdentity; } 49 public final boolean equals(Object obj) { 50 if (obj instanceof DTMXRTreeFrag) { 51 return (m_dtmIdentity == ((DTMXRTreeFrag)obj).getDTMIdentity()); 52 } 53 return false; 54 } 55 56 } 57 | Popular Tags |