From 5f3c34911c40f6d03deb809eb229ece46284172c Mon Sep 17 00:00:00 2001 From: CaderHancock <30449937+CaderHancock@users.noreply.github.com> Date: Thu, 10 Oct 2019 13:46:49 -0700 Subject: [PATCH] Overload methods are not grouped together (#210) * Overload methods are not grouped together --- .../assembly/DefaultInstructionSet.java | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Server/src/main/java/net/simon987/server/assembly/DefaultInstructionSet.java b/Server/src/main/java/net/simon987/server/assembly/DefaultInstructionSet.java index cd9aa3f..b7288a6 100755 --- a/Server/src/main/java/net/simon987/server/assembly/DefaultInstructionSet.java +++ b/Server/src/main/java/net/simon987/server/assembly/DefaultInstructionSet.java @@ -104,18 +104,9 @@ public class DefaultInstructionSet implements InstructionSet { return defaultInstruction; } } - /** - * Add a new instruction to the instructionSet - * - * @param opcode opcode of the instruction - * @param instruction Instruction to add + * Get an instruction from its mnemonic */ - public void addInstruction(int opcode, Instruction instruction) { - instructionMap.put(opcode, instruction); - } - - @Override public Instruction get(String mnemonic) { for (Instruction ins : instructionMap.values()) { @@ -131,7 +122,15 @@ public class DefaultInstructionSet implements InstructionSet { return null; } - + /** + * Add a new instruction to the instructionSet + * + * @param opcode opcode of the instruction + * @param instruction Instruction to add + */ + public void addInstruction(int opcode, Instruction instruction) { + instructionMap.put(opcode, instruction); + } @Override public void add(Instruction instruction) {