| 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 | |
| 14 | package uk.me.parabola.imgfmt.app.mdr; |
| 15 | |
| 16 | /** |
| 17 | * An index into mdr11. |
| 18 | * There is a primary ordering on the type and a secondary ordering on the |
| 19 | * record number of the mdr11 record. The type is not actually stored |
| 20 | * in this section, you use mdr9 to divide up this section into groups of |
| 21 | * types. |
| 22 | * |
| 23 | * This section contains the subtype of each point. |
| 24 | * |
| 25 | * @author Steve Ratcliffe |
| 26 | */ |
| 27 | public class Mdr10Record implements Comparable<Mdr10Record> { |
| 28 | private int subtype; |
| 29 | private Mdr11Record mdr11ref; |
| 30 | |
| 31 | public int compareTo(Mdr10Record o) { |
| 32 | return Integer.compare(mdr11ref.getRecordNumber(), o.mdr11ref.getRecordNumber()); |
| 33 | } |
| 34 | |
| 35 | public Mdr11Record getMdr11ref() { |
| 36 | return mdr11ref; |
| 37 | } |
| 38 | |
| 39 | public void setMdr11ref(Mdr11Record mdr11ref) { |
| 40 | this.mdr11ref = mdr11ref; |
| 41 | } |
| 42 | |
| 43 | public int getSubtype() { |
| 44 | return subtype; |
| 45 | } |
| 46 | |
| 47 | public void setSubtype(int subtype) { |
| 48 | this.subtype = subtype; |
| 49 | } |
| 50 | } |