Debian Codegraph @

src/smetana/core/amiga/AreaInt.java

raw symbols SCIP
1 /* ========================================================================
2 * PlantUML : a free UML diagram generator
3 * ========================================================================
4 *
5 * Project Info: http://plantuml.com
6 *
7 * If you like this project or if you find it useful, you can support us at:
8 *
9 * http://plantuml.com/patreon (only 1$ per month!)
10 * http://plantuml.com/paypal
11 *
12 * This file is part of Smetana.
13 * Smetana is a partial translation of Graphviz/Dot sources from C to Java.
14 *
15 * (C) Copyright 2009-2020, Arnaud Roques
16 *
17 * This translation is distributed under the same Licence as the original C program.
18 *
19 * THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC
20 * LICENSE ("AGREEMENT"). [Eclipse Public License - v 1.0]
21 *
22 * ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES
23 * RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
24 *
25 * You may obtain a copy of the License at
26 *
27 * http://www.eclipse.org/legal/epl-v10.html
28 *
29 * Unless required by applicable law or agreed to in writing, software
30 * distributed under the License is distributed on an "AS IS" BASIS,
31 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32 * See the License for the specific language governing permissions and
33 * limitations under the License.
34 *
35 */
36
37 package smetana.core.amiga;
38
39 public class AreaInt implements Area {
40
41 private int data = 0;
42
43 private final int UID = Counter.CPT++;
44
45 private String getUID36() {
46 return Integer.toString(UID, 36);
47 }
48
49 @Override
50 public String toString() {
51 return "AreaArray " + getUID36() + " " + data;
52 }
53
54 public void memcopyFrom(Area source) {
55 AreaInt other = (AreaInt) source;
56 this.data = other.data;
57 }
58
59 public void setInternal(int data) {
60 this.data = data;
61 if (trace()) {
62 System.err.println("set I AM " + this);
63 }
64 }
65
66 private boolean trace() {
67 return false;
68 //return getUID36().equals("2z7");
69 }
70
71 public int getInternal() {
72 if (trace()) {
73 // System.err.println("get I AM " + this);
74 }
75 return data;
76 }
77
78 // public void incInternal(int increment) {
79 // data += increment;
80 //
81 // }
82 }