public boolean isComparing(PdfIndirectReference cmpObject,PdfIndirectReference outObject){
  return indirects.contains(new IndirectPathItem(cmpObject,outObject));
}

public boolean isComparing ( PdfIndirectReference cmpObject , PdfIndirectReference outObject ) { return indirects . contains ( new IndirectPathItem ( cmpObject , outObject ) ) ; }
this method is used to define if given objects were already met in the path to the current base objects . if this method returns true it basically means that we found a loop in the objects structure and that we already compared these objects .
