diff options
Diffstat (limited to 'src/org/apache/fop/pdf/PDFFileSpec.java')
-rw-r--r-- | src/org/apache/fop/pdf/PDFFileSpec.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/org/apache/fop/pdf/PDFFileSpec.java b/src/org/apache/fop/pdf/PDFFileSpec.java index d7c5338d0..2f7b2a141 100644 --- a/src/org/apache/fop/pdf/PDFFileSpec.java +++ b/src/org/apache/fop/pdf/PDFFileSpec.java @@ -53,4 +53,29 @@ public class PDFFileSpec extends PDFObject { * >> * endobj */ + + /** + * Check if this equals another object. + * + * @param obj the object to compare + * @return true if this equals other object + */ + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + + if (obj == null || !(obj instanceof PDFFileSpec)) { + return false; + } + + PDFFileSpec spec = (PDFFileSpec)obj; + + if (!spec.filename.equals(filename)) { + return false; + } + + return true; + } } + |