01: package com.etymon.pj.object.pagemark;
02:
03: import java.io.*;
04: import java.util.*;
05: import com.etymon.pj.object.*;
06:
07: /**
08: Graphics operator: d.
09: @author Nassib Nassar
10: */
11: public class Xd extends PageMarkOperator {
12:
13: public Xd(PjArray array, PjNumber phase) {
14: _array = array;
15: _phase = phase;
16: }
17:
18: public PjArray getArray() {
19: return _array;
20: }
21:
22: public PjNumber getPhase() {
23: return _phase;
24: }
25:
26: public long writePdf(OutputStream os) throws IOException {
27: long z = _array.writePdf(os);
28: z = z + write(os, ' ');
29: z = z + _phase.writePdf(os);
30: z = z + writeln(os, " d");
31: return z;
32: }
33:
34: /**
35: Returns a deep copy of this object.
36: @return a deep copy of this object.
37: @exception CloneNotSupportedException if the instance can not be cloned.
38: */
39: public Object clone() throws CloneNotSupportedException {
40: return new Xd((PjArray) (_array.clone()), _phase);
41: }
42:
43: public boolean equals(Object obj) {
44: if (obj == null) {
45: return false;
46: }
47: if (obj instanceof Xd) {
48: return ((_array.equals(((Xd) obj)._array)) && (_phase
49: .equals(((Xd) obj)._phase)));
50: } else {
51: return false;
52: }
53: }
54:
55: private PjArray _array;
56: private PjNumber _phase;
57:
58: }
|