OutputDocument.IsEquivalent

Prototypes

static boolean IsEquivalent( OutputDocument doc1, OutputDocument doc2 )

Return Value

If the two variables refer to the same LISTING output document, the return value is true. If either variable is null or the variables refer to different LISTING output documents, the return value is false.

Parameters

OutputDocument doc1
An object of the OutputDocument class.

OutputDocument doc2
An object of the OutputDocument class.

Remarks

This method determines whether two objects of the OutputDocument class refer to the same LISTING output document.

Technical Note: This method does not return the same values as the Java method Object.equals. The OutputDocument objects that an IMLPlus programmer manipulates are actually proxies for LISTING output documents. It is possible to have multiple proxies that refer to the same LISTING output document.

Example
declare OutputDocument doc1, doc2, doc3;
doc1 = OutputDocument.Create();
doc2 = OutputDocument.GetDefault();
doc3 = OutputDocument.Create( false, false );

if OutputDocument.IsEquivalent( doc1, doc2 ) then
    print "doc1 and doc2 refer to the same document";
else
    print "doc1 and doc2 refer to different documents";

if OutputDocument.IsEquivalent( doc1, doc3 ) then
    print "doc1 and doc3 refer to the same document";
else
    print "doc1 and doc3 refer to different documents";