Debian Codegraph @

src/uk/me/parabola/imgfmt/app/mdr/Mdr13Record.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2009.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 3 or
6 * version 2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * General Public License for more details.
12 */
13 package uk.me.parabola.imgfmt.app.mdr;
14
15 /**
16 * Information about a region.
17 * @author Steve Ratcliffe
18 */
19 public class Mdr13Record extends RecordBase implements Comparable<Mdr13Record>, NamedRecord {
20 private int regionIndex;
21 private int countryIndex;
22 private int lblOffset;
23 private int strOffset;
24 private String name;
25 private Mdr14Record mdr14;
26 private Mdr28Record mdr28;
27
28 /**
29 * We sort first by map id and then by region id.
30 */
31 public int compareTo(Mdr13Record o) {
32 int d = Integer.compare(getMapIndex(), o.getMapIndex());
33 if (d == 0)
34 d = Integer.compare(regionIndex, o.regionIndex);
35 return d;
36 }
37
38 public int getRegionIndex() {
39 return regionIndex;
40 }
41
42 public void setRegionIndex(int regionIndex) {
43 this.regionIndex = regionIndex;
44 }
45
46 public int getStrOffset() {
47 return strOffset;
48 }
49
50 public void setStrOffset(int strOffset) {
51 this.strOffset = strOffset;
52 }
53
54 public void setCountryIndex(int countryIndex) {
55 this.countryIndex = countryIndex;
56 }
57
58 public int getCountryIndex() {
59 return countryIndex;
60 }
61
62 public int getLblOffset() {
63 return lblOffset;
64 }
65
66 public void setLblOffset(int lblOffset) {
67 this.lblOffset = lblOffset;
68 }
69
70 public String getName() {
71 return name;
72 }
73
74 public void setName(String name) {
75 this.name = name;
76 }
77
78 public Mdr14Record getMdr14() {
79 return mdr14;
80 }
81
82 public void setMdr14(Mdr14Record mdr14) {
83 this.mdr14 = mdr14;
84 }
85
86 public Mdr28Record getMdr28() {
87 return mdr28;
88 }
89
90 public void setMdr28(Mdr28Record mdr28) {
91 this.mdr28 = mdr28;
92 }
93 }