KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > it > stefanochizzolini > clown > documents > contents > objects > Operation


1 /*
2   Copyright 2006 Stefano Chizzolini. http://clown.stefanochizzolini.it
3
4   Contributors:
5     * Stefano Chizzolini (original code developer, info@stefanochizzolini.it):
6       contributed code is Copyright 2006 by Stefano Chizzolini.
7
8   This file should be part of the source code distribution of "PDF Clown library"
9   (the Program): see the accompanying README files for more info.
10
11   This Program is free software; you can redistribute it and/or modify it under
12   the terms of the GNU General Public License as published by the Free Software
13   Foundation; either version 2 of the License, or (at your option) any later version.
14
15   This Program is distributed in the hope that it will be useful, but WITHOUT ANY
16   WARRANTY, either expressed or implied; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more details.
18
19   You should have received a copy of the GNU General Public License along with this
20   Program (see README files); if not, go to the GNU website (http://www.gnu.org/).
21
22   Redistribution and use, with or without modification, are permitted provided that such
23   redistributions retain the above copyright notice, license and disclaimer, along with
24   this list of conditions.
25 */

26
27 package it.stefanochizzolini.clown.documents.contents.objects;
28
29 import it.stefanochizzolini.clown.objects.PdfDirectObject;
30 import it.stefanochizzolini.clown.util.NotImplementedException;
31
32 import java.util.List JavaDoc;
33
34 /**
35   Content stream instruction [PDF:1.6:3.7.1].
36 */

37 public class Operation
38 {
39   // <class>
40
// <dynamic>
41
// <fields>
42
private String JavaDoc operator;
43   private List JavaDoc<PdfDirectObject> operands;
44   // </fields>
45

46   // <constructors>
47
/**
48     <h3>Remarks</h3>
49     <p>For internal use only.</p>
50   */

51   public Operation(
52     String JavaDoc operator,
53     List JavaDoc<PdfDirectObject> operands
54     )
55   {
56     this.operator = operator;
57     this.operands = operands;
58   }
59   // </constructors>
60

61   // <interface>
62
// <public>
63
public String JavaDoc getOperator(
64     )
65   {return operator;}
66
67   public List JavaDoc<PdfDirectObject> getOperands(
68     )
69   {return operands;}
70
71   /**
72     Gets the PDF representation of the object.
73   */

74   public String JavaDoc toPdf(
75     )
76   {throw new NotImplementedException();}
77
78   public String JavaDoc toString(
79     )
80   {
81     return "{"
82       + operator + " "
83       + operands.toString()
84       + "}";
85   }
86   // </public>
87
// </interface>
88
// </dynamic>
89
// </class>
90
}
Popular Tags