Debian Codegraph @

src/uk/me/parabola/imgfmt/app/mdr/Mdr14Record.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 * A country record.
17 * @author Steve Ratcliffe
18 */
19 public class Mdr14Record extends RecordBase implements Comparable<Mdr14Record>, NamedRecord {
20 private int countryIndex;
21 private int lblOffset;
22 private int strOff;
23 private String name;
24 private Mdr29Record mdr29;
25
26 /**
27 * Sort by map id and then country id like for regions. We don't have
28 * any evidence that this is necessary, but it would be surprising if
29 * it wasn't.
30 */
31 public int compareTo(Mdr14Record o) {
32 int d = Integer.compare(getMapIndex(), o.getMapIndex());
33 if (d == 0)
34 d = Integer.compare(countryIndex, o.countryIndex);
35 return d;
36 }
37
38 public int getCountryIndex() {
39 return countryIndex;
40 }
41
42 public void setCountryIndex(int countryIndex) {
43 this.countryIndex = countryIndex;
44 }
45
46 public int getLblOffset() {
47 return lblOffset;
48 }
49
50 public void setLblOffset(int lblOffset) {
51 this.lblOffset = lblOffset;
52 }
53
54 public int getStrOff() {
55 return strOff;
56 }
57
58 public void setStrOff(int strOff) {
59 this.strOff = strOff;
60 }
61
62 public String getName() {
63 return name;
64 }
65
66 public void setName(String name) {
67 this.name = name;
68 }
69
70 public Mdr29Record getMdr29() {
71 return mdr29;
72 }
73
74 public void setMdr29(Mdr29Record mdr29) {
75 this.mdr29 = mdr29;
76 }
77 }