/** * Check the cmdList to see if this command exists, return * true if the verb is there. */ private boolean checkForVerb(List cmdList, String verb) { Iterator ee = cmdList.iterator(); while (ee.hasNext()) { String enum_verb = (String)((CommandInfo)ee.next()).getCommandName(); if (enum_verb.equals(verb)) return true; } return false; }
/** * Check the cmdList to see if this command exists, return * true if the verb is there. */ private boolean checkForVerb(List cmdList, String verb) { Iterator ee = cmdList.iterator(); while (ee.hasNext()) { String enum_verb = (String)((CommandInfo)ee.next()).getCommandName(); if (enum_verb.equals(verb)) return true; } return false; }
/** * Check the cmdList to see if this command exists, return * true if the verb is there. */ private boolean checkForVerb(List cmdList, String verb) { Iterator ee = cmdList.iterator(); while (ee.hasNext()) { String enum_verb = (String)((CommandInfo)ee.next()).getCommandName(); if (enum_verb.equals(verb)) return true; } return false; }
/** * Check the cmdList to see if this command exists, return * true if the verb is there. */ private boolean checkForVerb(List cmdList, String verb) { Iterator ee = cmdList.iterator(); while (ee.hasNext()) { String enum_verb = (String)((CommandInfo)ee.next()).getCommandName(); if (enum_verb.equals(verb)) return true; } return false; }
/** * Check the cmdList to see if this command exists, return * true if the verb is there. */ private boolean checkForVerb(List cmdList, String verb) { Iterator ee = cmdList.iterator(); while (ee.hasNext()) { String enum_verb = (String)((CommandInfo)ee.next()).getCommandName(); if (enum_verb.equals(verb)) return true; } return false; }
/** * Check the cmdList to see if this command exists, return * true if the verb is there. */ private boolean checkForVerb(List cmdList, String verb) { Iterator ee = cmdList.iterator(); while (ee.hasNext()) { String enum_verb = (String)((CommandInfo)ee.next()).getCommandName(); if (enum_verb.equals(verb)) return true; } return false; }
/** * Check the cmdList to see if this command exists, return * true if the verb is there. */ private boolean checkForVerb(List cmdList, String verb) { Iterator ee = cmdList.iterator(); while (ee.hasNext()) { String enum_verb = (String)((CommandInfo)ee.next()).getCommandName(); if (enum_verb.equals(verb)) return true; } return false; }
/** * Add a command to a target command list (preferred or fallback). * * @param commandList * The target command list. * @param mimeType The MIME type the command is associated with. * @param command The command information. */ private void addCommand(Map commandList, String mimeType, CommandInfo command) { Map commands = (Map) commandList.get(mimeType); if (commands == null) { commands = new HashMap(); commandList.put(mimeType, commands); } commands.put(command.getCommandName(), command); }
/** * Check the cmdList to see if this command exists, return * true if the verb is there. */ private boolean checkForVerb(List cmdList, String verb) { Iterator ee = cmdList.iterator(); while (ee.hasNext()) { String enum_verb = (String)((CommandInfo)ee.next()).getCommandName(); if (enum_verb.equals(verb)) return true; } return false; }
/** * Add a command to a target command list (preferred or fallback). * * @param commandList * The target command list. * @param mimeType The MIME type the command is associated with. * @param command The command information. */ private void addCommand(Map commandList, String mimeType, CommandInfo command) { Map commands = (Map) commandList.get(mimeType); if (commands == null) { commands = new HashMap(); commandList.put(mimeType, commands); } commands.put(command.getCommandName(), command); }
/** * Add a command to a target command list (preferred or fallback). * * @param commandList * The target command list. * @param mimeType The MIME type the command is associated with. * @param command The command information. */ protected void addCommand(Map commandList, String mimeType, CommandInfo command) { Map commands = (Map) commandList.get(mimeType); if (commands == null) { commands = new HashMap(); commandList.put(mimeType, commands); } commands.put(command.getCommandName(), command); }
/** * Add a command to a target command list (preferred or fallback). * * @param commandList * The target command list. * @param mimeType The MIME type the command is associated with. * @param command The command information. */ private void addCommand(Map commandList, String mimeType, CommandInfo command) { Map commands = (Map) commandList.get(mimeType); if (commands == null) { commands = new HashMap(); commandList.put(mimeType, commands); } commands.put(command.getCommandName(), command); }
@Override public synchronized CommandInfo[] getAllCommands(String mimeType) { CommandInfo[] commands = super.getAllCommands(mimeType); CommandInfo[] defaultCommands = DEFAULT_COMMAND_MAP.getAllCommands(mimeType); List<CommandInfo> cmdList = new ArrayList<>(Arrays.asList(commands)); // Add CommandInfo which does not exist in current command map. for (CommandInfo defCmdInfo : defaultCommands) { String defCmdName = defCmdInfo.getCommandName(); boolean cmdNameExist = false; for (CommandInfo cmdInfo : commands) { if (cmdInfo.getCommandName().equals(defCmdName)) { cmdNameExist = true; break; } } if (!cmdNameExist) { cmdList.add(defCmdInfo); } } CommandInfo[] allCommandArray = new CommandInfo[0]; return cmdList.toArray(allCommandArray); }
@Override public synchronized CommandInfo[] getAllCommands(String mimeType) { CommandInfo[] commands = super.getAllCommands(mimeType); CommandInfo[] defaultCommands = DEFAULT_COMMAND_MAP.getAllCommands(mimeType); List<CommandInfo> cmdList = new ArrayList<CommandInfo>(Arrays.asList(commands)); // Add CommandInfo which does not exist in current command map. for (CommandInfo defCmdInfo : defaultCommands) { String defCmdName = defCmdInfo.getCommandName(); boolean cmdNameExist = false; for (CommandInfo cmdInfo : commands) { if (cmdInfo.getCommandName().equals(defCmdName)) { cmdNameExist = true; break; } } if (!cmdNameExist) { cmdList.add(defCmdInfo); } } CommandInfo[] allCommandArray = new CommandInfo[0]; return cmdList.toArray(allCommandArray); }
@Override public synchronized CommandInfo[] getAllCommands(String mimeType) { CommandInfo[] commands = super.getAllCommands(mimeType); CommandInfo[] defaultCommands = DEFAULT_COMMAND_MAP.getAllCommands(mimeType); List<CommandInfo> cmdList = new ArrayList<>(Arrays.asList(commands)); // Add CommandInfo which does not exist in current command map. for (CommandInfo defCmdInfo : defaultCommands) { String defCmdName = defCmdInfo.getCommandName(); boolean cmdNameExist = false; for (CommandInfo cmdInfo : commands) { if (cmdInfo.getCommandName().equals(defCmdName)) { cmdNameExist = true; break; } } if (!cmdNameExist) { cmdList.add(defCmdInfo); } } CommandInfo[] allCommandArray = new CommandInfo[0]; return cmdList.toArray(allCommandArray); }
@Override public synchronized CommandInfo[] getAllCommands(String mimeType) { CommandInfo[] commands = super.getAllCommands(mimeType); CommandInfo[] defaultCommands = DEFAULT_COMMAND_MAP.getAllCommands(mimeType); List<CommandInfo> cmdList = new ArrayList<CommandInfo>(Arrays.asList(commands)); // Add CommandInfo which does not exist in current command map. for (CommandInfo defCmdInfo : defaultCommands) { String defCmdName = defCmdInfo.getCommandName(); boolean cmdNameExist = false; for (CommandInfo cmdInfo : commands) { if (cmdInfo.getCommandName().equals(defCmdName)) { cmdNameExist = true; break; } } if (!cmdNameExist) { cmdList.add(defCmdInfo); } } CommandInfo[] allCommandArray = new CommandInfo[0]; return cmdList.toArray(allCommandArray); }