public int[] getIR(String type) { int[] ba, ret = null; type = type.toLowerCase(); if (getCommands != null) { ba = getCommands.getIR(); if (type.equals("left")) { ret = new int[1]; ret[0] = ba[0]; } else if (type.equals("right")) { ret = new int[1]; ret[0] = ba[1]; } else { ret = ba; } } return ret; }