1 package org.kit.furia.fragment.x86;
2
3 /*
4 OBSearch: a distributed similarity search engine This project is to
5 similarity search what 'bit-torrent' is to downloads.
6 Copyright (C) 2008 Arnoldo Jose Muller Molina
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22 /**
23 * X86Instruction
24 * @author Arnoldo Jose Muller Molina
25 */
26
27 public class X86Instruction implements Comparable{
28
29
30 /**
31 * Address of the instruction.
32 */
33 private long address;
34
35 private String instruction;
36
37 private Param[] params;
38
39 /* (non-Javadoc)
40 * @see java.lang.Comparable#compareTo(java.lang.Object)
41 */
42 public int compareTo(Object o) {
43 X86Instruction other = (X86Instruction)o;
44 if(address > other.address){
45 return 1;
46 }else if (address < other.address){
47 return -1;
48 }else{
49 return 0;
50 }
51
52 }
53 }